[Vegan-commits] r597 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 26 13:48:34 CET 2008


Author: jarioksa
Date: 2008-11-26 13:48:34 +0100 (Wed, 26 Nov 2008)
New Revision: 597

Modified:
   pkg/vegan/R/commsimulator.R
   pkg/vegan/inst/ChangeLog
Log:
commsimulator: simulated null matrices have same attributes as input (most importantly column and row names)

Modified: pkg/vegan/R/commsimulator.R
===================================================================
--- pkg/vegan/R/commsimulator.R	2008-11-25 10:32:39 UTC (rev 596)
+++ pkg/vegan/R/commsimulator.R	2008-11-26 12:48:34 UTC (rev 597)
@@ -8,6 +8,7 @@
         x <- ifelse(x > 0, 1, 0)
     nr <- nrow(x)
     nc <- ncol(x)
+    at <- attributes(x)
     if (method %in% c("r0", "r1", "r2")) {
         rs <- rowSums(x)
         if (method == "r0")
@@ -94,6 +95,6 @@
                 out <- oldout
         }
     }
+    attributes(out) <- at
     out
 }
-

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2008-11-25 10:32:39 UTC (rev 596)
+++ pkg/vegan/inst/ChangeLog	2008-11-26 12:48:34 UTC (rev 597)
@@ -4,6 +4,13 @@
 
 Version 1.16-5
 
+	* commsimulator: simulated null models have same column and row
+	names as the original input (as.)matrix. There was a problem
+	report by a user who tried to use column names during evaluation
+	of the statistic. Done by setting attributes (and it would be
+	possible to replace dim() setting by attributes() setting in the
+	code).    
+
 	* ordisurf: gains argument 'bubble' to use bubble plots for
 	points, and 'cex' to set the symbol size (or the maximum size with
 	'bubble = TRUE').



More information about the Vegan-commits mailing list