[Vegan-commits] r631 - in pkg/vegan: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 10 05:45:34 CET 2008
Author: psolymos
Date: 2008-12-10 05:45:34 +0100 (Wed, 10 Dec 2008)
New Revision: 631
Modified:
pkg/vegan/R/plot.permat.R
pkg/vegan/man/adipart.Rd
pkg/vegan/man/permatfull.Rd
Log:
beauty salon for R functions
Modified: pkg/vegan/R/plot.permat.R
===================================================================
--- pkg/vegan/R/plot.permat.R 2008-12-09 18:47:57 UTC (rev 630)
+++ pkg/vegan/R/plot.permat.R 2008-12-10 04:45:34 UTC (rev 631)
@@ -1,11 +1,17 @@
## S3 plot method for permat
`plot.permat` <-
-function(x, ylab="Bray-Curtis dissimilarity", xlab="Runs", col=c(2,4), lty=c(1,2), plot=TRUE, text=TRUE, ...)
+function(x, ylab, xlab, col, lty, plot=TRUE, text=TRUE, ...)
{
+ if (missing(ylab))
+ ylab <- "Bray-Curtis dissimilarity"
+ if (missing(xlab))
+ xlab <- "Runs"
+ if (missing(col))
+ col <- c(2,4)
+ if (missing(lty))
+ lty <- c(1,2)
n <- attr(x, "times")
bray <- numeric(n)
-# for (i in 1:n) bray[i] <- sum(abs(x$orig-x$perm[[i]]))/sum(x$orig+x$perm[[i]])
-# bray <- sapply(x$perm, function(z) sum(abs(x$orig - z)) / sum(x$orig + z))
bray <- summary(x)$bray
if (plot) {
plot(bray,type="n",ylab=ylab,xlab=xlab, ...)
Modified: pkg/vegan/man/adipart.Rd
===================================================================
--- pkg/vegan/man/adipart.Rd 2008-12-09 18:47:57 UTC (rev 630)
+++ pkg/vegan/man/adipart.Rd 2008-12-10 04:45:34 UTC (rev 631)
@@ -48,7 +48,7 @@
The expected diversity components are calculated \code{nsimul} times by individual based randomisation of the community data matrix. This is done by the \code{\link{permatfull}} and \code{\link{permatswap}} functions, and properties of the null model can be set by the \code{control} argument (see \code{\link{permat.control}}). The null matrics then evaluated via the function \code{\link{oecosimu}}.
}
\value{
-An object of class 'adipart' with same structure as 'oecosimu' objects
+An object of class 'adipart' with same structure as 'oecosimu' objects.
}
\references{
Lande, R. 1996. Statistics and partitioning of species diversity, and similarity among multiple communities. \emph{Oikos}, 76, 5-13.
Modified: pkg/vegan/man/permatfull.Rd
===================================================================
--- pkg/vegan/man/permatfull.Rd 2008-12-09 18:47:57 UTC (rev 630)
+++ pkg/vegan/man/permatfull.Rd 2008-12-10 04:45:34 UTC (rev 631)
@@ -25,8 +25,7 @@
permat.control(ptype = "full", mtype = "count", method = "quasiswap",
fixedmar = "both", shuffle = "ind", strata = NULL,
burnin = 10000, thin = 1000)
-\method{plot}{permat}(x, ylab="Bray-Curtis dissimilarity",
-xlab="Runs", col=c(2,4), lty=c(1,2), plot=TRUE, text=TRUE, ...)
+\method{plot}{permat}(x, ylab, xlab, col, lty, plot=TRUE, text=TRUE, ...)
\method{lines}{permat}(x, ...)
\method{summary}{permat}(object, ...)
\method{print}{summary.permat}(x, digits = 2, ...)
More information about the Vegan-commits
mailing list