[Rflptools-commits] r5 - in pkg/RFLPtools: . R inst/doc man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 14 10:24:30 CEST 2010
Author: stamats
Date: 2010-06-14 10:24:30 +0200 (Mon, 14 Jun 2010)
New Revision: 5
Added:
pkg/RFLPtools/R/diffDist.R
pkg/RFLPtools/man/diffDist.Rd
Modified:
pkg/RFLPtools/DESCRIPTION
pkg/RFLPtools/NAMESPACE
pkg/RFLPtools/NEWS
pkg/RFLPtools/inst/doc/RFLPtools.pdf
pkg/RFLPtools/man/0RFLP-package.Rd
Log:
added function diffDist, increased version number to 1.3
Modified: pkg/RFLPtools/DESCRIPTION
===================================================================
--- pkg/RFLPtools/DESCRIPTION 2010-06-09 08:41:28 UTC (rev 4)
+++ pkg/RFLPtools/DESCRIPTION 2010-06-14 08:24:30 UTC (rev 5)
@@ -1,8 +1,8 @@
Package: RFLPtools
Type: Package
Title: Tools to analyse RFLP data
-Version: 1.2
-Date: 2010-06-09
+Version: 1.3
+Date: 2010-06-14
Author: Fabienne Flessa, Alexandra Kehl, Matthias Kohl
Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
Description: RFLPtools provides functions to analyse DNA fragment samples
Modified: pkg/RFLPtools/NAMESPACE
===================================================================
--- pkg/RFLPtools/NAMESPACE 2010-06-09 08:41:28 UTC (rev 4)
+++ pkg/RFLPtools/NAMESPACE 2010-06-14 08:24:30 UTC (rev 5)
@@ -1,4 +1,5 @@
export(read.rflp,
+ diffDist,
RFLPqc,
RFLPdist,
RFLPdist2,
Modified: pkg/RFLPtools/NEWS
===================================================================
--- pkg/RFLPtools/NEWS 2010-06-09 08:41:28 UTC (rev 4)
+++ pkg/RFLPtools/NEWS 2010-06-14 08:24:30 UTC (rev 5)
@@ -24,3 +24,8 @@
- added reference to recent article
- in examples now use of simPlot instead of corPlot, hence requires package
MKmisc version 0.8
+
+###########################################################
+## Version 1.3
+###########################################################
+- added function diffDist
\ No newline at end of file
Added: pkg/RFLPtools/R/diffDist.R
===================================================================
--- pkg/RFLPtools/R/diffDist.R (rev 0)
+++ pkg/RFLPtools/R/diffDist.R 2010-06-14 08:24:30 UTC (rev 5)
@@ -0,0 +1,4 @@
+diffDist <- function(x, method = "euclidean", diag = FALSE, upper = FALSE, p = 2){
+ x.diff <- t(diff(t(x)))
+ dist(x.diff, method = method, diag = diag, upper = upper, p = p)
+}
Modified: pkg/RFLPtools/inst/doc/RFLPtools.pdf
===================================================================
(Binary files differ)
Modified: pkg/RFLPtools/man/0RFLP-package.Rd
===================================================================
--- pkg/RFLPtools/man/0RFLP-package.Rd 2010-06-09 08:41:28 UTC (rev 4)
+++ pkg/RFLPtools/man/0RFLP-package.Rd 2010-06-14 08:24:30 UTC (rev 5)
@@ -14,8 +14,8 @@
\details{
\tabular{ll}{
Package: \tab RFLPtools\cr
-Version: \tab 1.2 \cr
-Date: \tab 2010-06-09 \cr
+Version: \tab 1.3 \cr
+Date: \tab 2010-06-14 \cr
Depends: \tab R(>= 2.10.0), stats, utils, grDevices, RColorBrewer\cr
Suggests: \tab lattice, MKmisc(>= 0.8)\cr
License: \tab LGPL-3\cr
Added: pkg/RFLPtools/man/diffDist.Rd
===================================================================
--- pkg/RFLPtools/man/diffDist.Rd (rev 0)
+++ pkg/RFLPtools/man/diffDist.Rd 2010-06-14 08:24:30 UTC (rev 5)
@@ -0,0 +1,52 @@
+\name{diffDist}
+\alias{diffDist}
+\title{ Distance Matrix Computation }
+\description{
+ This function computes and returns the distance matrix computed by
+ using the specified distance measure to compute the distances between
+ the rows of a data matrix. Instead of the row values as in the case of
+ \code{\link[stats]{dist}}, the successive differences of the row values
+ are used.
+}
+\usage{
+diffDist(x, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
+}
+\arguments{
+ \item{x}{a numeric matrix, data frame or \code{"dist"} object.}
+ \item{method}{the distance measure to be used. This must be one of
+ \code{"euclidean"}, \code{"maximum"}, \code{"manhattan"},
+ \code{"canberra"}, \code{"binary"} or \code{"minkowski"}.
+ Any unambiguous substring can be given.}
+ \item{diag}{logical value indicating whether the diagonal of the
+ distance matrix should be printed by \code{print.dist}.}
+ \item{upper}{logical value indicating whether the upper triangle of the
+ distance matrix should be printed by \code{print.dist}.}
+ \item{p}{The power of the Minkowski distance.}
+}
+\details{
+ This function computes and returns the distance matrix computed by
+ using the specified distance measure to compute the distances between
+ the rows of a data matrix. Instead of the row values as in the case of
+ \code{\link[stats]{dist}}, the successive differences of the row values
+ are used.
+
+ It's a simple wrapper function arround \code{\link[stats]{dist}}. For
+ more details about the distances we refer to \code{\link[stats]{dist}}.
+
+ The function may be helpful, if there is a shift w.r.t.\ the measured
+ bands; e.g.\ \code{c(550, 500, 300, 250)} vs.\ \code{c(510, 460, 260, 210)}.
+}
+\value{
+ \code{diffDist} returns an object of class \code{"dist"}; cf. \code{\link[stats]{dist}}.
+}
+%\references{}
+\author{ Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+%\note{}
+\examples{
+## assume a shift in the measured bands
+M <- rbind(c(550, 500, 300, 250), c(510, 460, 260, 210),
+ c(550, 500, 300, 200))
+dist(M)
+diffDist(M)
+}
+\keyword{multivariate}
More information about the Rflptools-commits
mailing list