[Vegan-commits] r903 - in pkg/vegan: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 20 18:37:03 CEST 2009
Author: gblanchet
Date: 2009-07-20 18:36:59 +0200 (Mon, 20 Jul 2009)
New Revision: 903
Modified:
pkg/vegan/R/plot.mantel.correlog.R
pkg/vegan/man/mantel.correlog.Rd
Log:
Add lines between points in the graph and an alpha parameter in plot.mantel.correlog. Help file was modified accordingly
Modified: pkg/vegan/R/plot.mantel.correlog.R
===================================================================
--- pkg/vegan/R/plot.mantel.correlog.R 2009-07-19 14:31:58 UTC (rev 902)
+++ pkg/vegan/R/plot.mantel.correlog.R 2009-07-20 16:36:59 UTC (rev 903)
@@ -1,13 +1,15 @@
-'plot.mantel.correlog' <- function(x, ...)
+'plot.mantel.correlog' <- function(x, alpha=0.05, ...)
{
lim = max(x$n.tests)
plot(x$mantel.res[1:lim,1],x$mantel.res[1:lim,3], xlab="Distance class index", ylab="Mantel r", pch=22)
if(x$mult=="none") {
- signif = which((x$mantel.res[1:lim,4] <= 0.05))
+ signif = which((x$mantel.res[1:lim,4] <= alpha))
} else {
- signif = which((x$mantel.res[1:lim,5] <= 0.05))
+ signif = which((x$mantel.res[1:lim,5] <= alpha))
}
+lines(x$mantel.res[1:lim,1], x$mantel.res[1:lim,3])
+points(x$mantel.res[1:lim,1], x$mantel.res[1:lim,3], pch=22, bg="white")
points(x$mantel.res[signif,1], x$mantel.res[signif,3], pch=22, bg="black")
-abline(a=0, b=0, col="red")
+abline(a=0, b=0, col="red")
invisible()
}
\ No newline at end of file
Modified: pkg/vegan/man/mantel.correlog.Rd
===================================================================
--- pkg/vegan/man/mantel.correlog.Rd 2009-07-19 14:31:58 UTC (rev 902)
+++ pkg/vegan/man/mantel.correlog.Rd 2009-07-20 16:36:59 UTC (rev 903)
@@ -10,7 +10,7 @@
mantel.correlog(D.eco, D.geo=NULL, XY=NULL, n.class=0, break.pts=NULL,
cutoff=TRUE, r.type="pearson", nperm=999, mult="holm", progressive=TRUE)
-\method{plot}{mantel.correlog}(x, ...)
+\method{plot}{mantel.correlog}(x, alpha=0.05, ...)
}
\arguments{
@@ -25,6 +25,7 @@
\item{mult}{ Correct P-values for multiple testing. The correction methods are \code{"holm"} (default), \code{"hochberg"}, \code{"sidak"}, and other methods available in the \code{\link{p.adjust}} function: \code{"bonferroni"} (best known, but not recommended because it is overly conservative), \code{"hommel"}, \code{"BH"}, \code{"BY"}, \code{"fdr"}, and \code{"none"}. }
\item{progressive}{ Default: \code{progressive=TRUE} for progressive correction of multiple-testing, as described in Legendre and Legendre (1998, p. 721). Test of the first distance class: no correction; second distance class: correct for 2 simultaneous tests; distance class k: correct for k simultaneous tests. \code{progressive=FALSE}: correct all tests for \code{n.class} simultaneous tests. }
\item{x}{ Output of \code{mantel.correlog}. }
+ \item{alpha}{ Significance level for the points drawn with black symbols in the correlogram. Default: \code{alpha=0.05}. }
\item{...}{ Other parameters passed from other functions. }
}
More information about the Vegan-commits
mailing list