[Vegan-commits] r2401 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Feb 2 17:43:42 CET 2013
Author: jarioksa
Date: 2013-02-02 17:43:42 +0100 (Sat, 02 Feb 2013)
New Revision: 2401
Modified:
pkg/vegan/R/simulate.rda.R
pkg/vegan/inst/ChangeLog
Log:
simulate for rda & cca also return dimnames (like does simulate.nullmodel since r2396)
Modified: pkg/vegan/R/simulate.rda.R
===================================================================
--- pkg/vegan/R/simulate.rda.R 2013-02-02 07:31:03 UTC (rev 2400)
+++ pkg/vegan/R/simulate.rda.R 2013-02-02 16:43:42 UTC (rev 2401)
@@ -53,6 +53,8 @@
ans <- ans[,,1]
attributes(ans) <- attributes(ftd)
} else {
+ dimnames(ans) <- list(rownames(ftd), colnames(ftd),
+ paste("sim", seq_len(nsim), sep = "_"))
attr(ans, "data") <- round(ftd + object$CA$Xbar, 12)
attr(ans, "method") <- paste("simulate", ifelse(is.null(indx),
"parametric", "index"))
@@ -131,6 +133,8 @@
ans <- ans[,,1]
attributes(ans) <- attributes(ftd)
} else {
+ dimnames(ans) <- list(rownames(ftd), colnames(ftd),
+ paste("sim", seq_len(nsim), sep = "_"))
obsdata <- ftd + object$CA$Xbar
obsdata <- (obsdata * sqrt(rc) + rc) * object$grand.total
attr(ans, "data") <- round(obsdata, 12)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2013-02-02 07:31:03 UTC (rev 2400)
+++ pkg/vegan/inst/ChangeLog 2013-02-02 16:43:42 UTC (rev 2401)
@@ -14,6 +14,11 @@
but now it is only of type "oecosimu" with the original
"statistic" as a separate item. So "statistic" is now one level
deeper instead of being the main object.
+
+ * simulate: the simulate functions for "rda" and "cca" return
+ objects with original row and column names. Function capscale()
+ already did so, and simulate.nullmodel() was changed so in vegan
+ 2.1-24 (r2396).
Version 2.1-24 (closed February 2, 2013)
More information about the Vegan-commits
mailing list