[Vegan-commits] r1889 - in pkg/vegan: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 26 09:01:47 CEST 2011


Author: psolymos
Date: 2011-09-26 09:01:47 +0200 (Mon, 26 Sep 2011)
New Revision: 1889

Modified:
   pkg/vegan/R/as.ts.permat.R
   pkg/vegan/R/print.summary.permat.R
   pkg/vegan/R/summary.permat.R
   pkg/vegan/man/oecosimu.Rd
Log:
methods for permat make use of commsim names, plus some fixes

Modified: pkg/vegan/R/as.ts.permat.R
===================================================================
--- pkg/vegan/R/as.ts.permat.R	2011-09-26 06:39:45 UTC (rev 1888)
+++ pkg/vegan/R/as.ts.permat.R	2011-09-26 07:01:47 UTC (rev 1889)
@@ -4,7 +4,9 @@
     type <- match.arg(type, c("bray", "chisq"))
     out <- summary(x)[[type]]
     if (!is.ts(out)) {
-        seqmethods <- c("swap", "tswap", "abuswap")
+        seqmethods <- sapply(make.commsim(), function(z) make.commsim(z)$isSeq)
+        seqmethods <- names(seqmethods)[seqmethods]
+#        seqmethods <- c("swap", "tswap", "abuswap")
         stop("as.ts available only for sequential methods ",
             paste(seqmethods, collapse=", "))
     } 

Modified: pkg/vegan/R/print.summary.permat.R
===================================================================
--- pkg/vegan/R/print.summary.permat.R	2011-09-26 06:39:45 UTC (rev 1888)
+++ pkg/vegan/R/print.summary.permat.R	2011-09-26 07:01:47 UTC (rev 1889)
@@ -7,11 +7,11 @@
     print(x$x$call)
     cat("\nMatrix type:", attr(x$x, "mtype"), "\nPermutation type:", attr(x$x, "ptype"))
     cat("\nMethod: ", attr(x, "method"), sep = "")
-    if (attr(x, "ptype") == "swap") {
-        if (!is.na(attr(x, "burnin")))
-            cat(", burnin: ", attr(x, "burnin"), sep = "")
-        if (!is.na(attr(x, "thin")))
-            cat(", thin: ", attr(x, "thin"), sep = "")
+    if (attr(x$x, "ptype") == "swap") {
+        if (!is.na(attr(x$x, "burnin")))
+            cat(", burnin: ", attr(x$x, "burnin"), sep = "")
+        if (!is.na(attr(x$x, "thin")))
+            cat(", thin: ", attr(x$x, "thin"), sep = "")
     }
     cat("\nRestricted:", attr(x$x, "is.strat"), "\nFixed margins:", attr(x$x, "fixedmar"))
     if (!is.na(attr(x$x, "shuffle"))) {

Modified: pkg/vegan/R/summary.permat.R
===================================================================
--- pkg/vegan/R/summary.permat.R	2011-09-26 06:39:45 UTC (rev 1888)
+++ pkg/vegan/R/summary.permat.R	2011-09-26 07:01:47 UTC (rev 1889)
@@ -34,7 +34,9 @@
     attr(chisq, "chisq.orig") <- sum((x$orig - E)^2 / E)
 #    attr(chisq, "df") <- (nr - 1) * (nc - 1)
     ## ts if sequential
-    seqmethods <- c("swap", "tswap", "abuswap")
+    seqmethods <- sapply(make.commsim(), function(z) make.commsim(z)$isSeq)
+    seqmethods <- names(seqmethods)[seqmethods]
+#    seqmethods <- c("swap", "tswap", "abuswap")
     if (attr(x, "method") %in% seqmethods) {
         startval <- attr(x, "burnin") + 1 
         dtime <- max(1, attr(x, "thin"))

Modified: pkg/vegan/man/oecosimu.Rd
===================================================================
--- pkg/vegan/man/oecosimu.Rd	2011-09-26 06:39:45 UTC (rev 1888)
+++ pkg/vegan/man/oecosimu.Rd	2011-09-26 07:01:47 UTC (rev 1889)
@@ -30,7 +30,7 @@
 
 \arguments{
   \item{comm}{Community data, or an object of class \code{simmat} (array 
-    of permuted matrices from \code{\link{simulae.nullmodel}}).}
+    of permuted matrices from \code{\link{simulate.nullmodel}}).}
   \item{x}{Community data for \code{commsimulator}, or an \code{oecosimu}
     result object for \code{as.ts}, \code{as.mcmc}, \code{density} and 
     \code{densityplot}.}



More information about the Vegan-commits mailing list