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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 23 21:12:10 CEST 2012


Author: psolymos
Date: 2012-04-23 21:12:10 +0200 (Mon, 23 Apr 2012)
New Revision: 2144

Modified:
   pkg/vegan/R/hiersimu.default.R
   pkg/vegan/R/hiersimu.formula.R
   pkg/vegan/R/multipart.default.R
   pkg/vegan/R/multipart.formula.R
   pkg/vegan/inst/ChangeLog
Log:
multipart ad hiersimu follow adipart (constant gamma fix)

Modified: pkg/vegan/R/hiersimu.default.R
===================================================================
--- pkg/vegan/R/hiersimu.default.R	2012-04-23 17:29:12 UTC (rev 2143)
+++ pkg/vegan/R/hiersimu.default.R	2012-04-23 19:12:10 UTC (rev 2144)
@@ -66,7 +66,7 @@
     evalFUN <- function(x) {
         if (fullgamma && !drop.highest) {
             tmp <- lapply(1:(nlevs-1), function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
-            tmp[[nlevs]] <- matrix(colSums(lhs), nrow = 1, ncol = ncol(lhs))
+            tmp[[nlevs]] <- matrix(colSums(x), nrow = 1, ncol = ncol(x))
         } else {
             tmp <- lapply(1:nlevs, function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
         }

Modified: pkg/vegan/R/hiersimu.formula.R
===================================================================
--- pkg/vegan/R/hiersimu.formula.R	2012-04-23 17:29:12 UTC (rev 2143)
+++ pkg/vegan/R/hiersimu.formula.R	2012-04-23 19:12:10 UTC (rev 2144)
@@ -69,7 +69,7 @@
     evalFUN <- function(x) {
         if (fullgamma && !drop.highest) {
             tmp <- lapply(1:(nlevs-1), function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
-            tmp[[nlevs]] <- matrix(colSums(lhs), nrow = 1, ncol = ncol(lhs))
+            tmp[[nlevs]] <- matrix(colSums(x), nrow = 1, ncol = ncol(x))
         } else {
             tmp <- lapply(1:nlevs, function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
         }

Modified: pkg/vegan/R/multipart.default.R
===================================================================
--- pkg/vegan/R/multipart.default.R	2012-04-23 17:29:12 UTC (rev 2143)
+++ pkg/vegan/R/multipart.default.R	2012-04-23 19:12:10 UTC (rev 2144)
@@ -78,7 +78,7 @@
         wdivfun <- function(x) {
             if (fullgamma) {
                 tmp <- lapply(1:(nlevs-1), function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
-                tmp[[nlevs]] <- matrix(colSums(lhs), nrow = 1, ncol = ncol(lhs))
+                tmp[[nlevs]] <- matrix(colSums(x), nrow = 1, ncol = ncol(x))
             } else {
                 tmp <- lapply(1:nlevs, function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
             }
@@ -94,7 +94,7 @@
         wdivfun <- function(x) {
             if (fullgamma) {
                 tmp <- lapply(1:(nlevs-1), function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
-                tmp[[nlevs]] <- matrix(colSums(lhs), nrow = 1, ncol = ncol(lhs))
+                tmp[[nlevs]] <- matrix(colSums(x), nrow = 1, ncol = ncol(x))
             } else {
                 tmp <- lapply(1:nlevs, function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
             }

Modified: pkg/vegan/R/multipart.formula.R
===================================================================
--- pkg/vegan/R/multipart.formula.R	2012-04-23 17:29:12 UTC (rev 2143)
+++ pkg/vegan/R/multipart.formula.R	2012-04-23 19:12:10 UTC (rev 2144)
@@ -82,7 +82,7 @@
         wdivfun <- function(x) {
             if (fullgamma) {
                 tmp <- lapply(1:(nlevs-1), function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
-                tmp[[nlevs]] <- matrix(colSums(lhs), nrow = 1, ncol = ncol(lhs))
+                tmp[[nlevs]] <- matrix(colSums(x), nrow = 1, ncol = ncol(x))
             } else {
                 tmp <- lapply(1:nlevs, function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
             }
@@ -98,7 +98,7 @@
         wdivfun <- function(x) {
             if (fullgamma) {
                 tmp <- lapply(1:(nlevs-1), function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
-                tmp[[nlevs]] <- matrix(colSums(lhs), nrow = 1, ncol = ncol(lhs))
+                tmp[[nlevs]] <- matrix(colSums(x), nrow = 1, ncol = ncol(x))
             } else {
                 tmp <- lapply(1:nlevs, function(i) t(model.matrix(ftmp[[i]], rhs)) %*% x)
             }

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-04-23 17:29:12 UTC (rev 2143)
+++ pkg/vegan/inst/ChangeLog	2012-04-23 19:12:10 UTC (rev 2144)
@@ -4,24 +4,29 @@
 
 Version 2.1-14 (opened March 9, 2012)
 
-  * adipart, multipart, hiersimu: these are now generic functions
-  with default and formula methods. The formula method is 
-  identical to the previous function, the default method
-  can take two matrices as input, but the second argument
-  describing the hierarchy can be missing. In this case
-  a trivial two-level hierarchy will be assumed (each row
-  is a seperate group, all rows are in same group).
+	* multipart and hiersimu: permutation tests assumed constant 
+	full gamma diversity in all simulations even when the null model 
+	could produce variable gamma diversities. The default method 
+	("r2dtable") had constant gamma diversity.
 
-  * scoverage: new function for sample coverage based 
-  correction for calculation of relative frequencies in count
-  community matrices (Good 1953, Biometrika 40, 237--264).
+	* adipart, multipart, hiersimu: these are now generic functions
+	with default and formula methods. The formula method is 
+	identical to the previous function, the default method
+	can take two matrices as input, but the second argument
+	describing the hierarchy can be missing. In this case
+	a trivial two-level hierarchy will be assumed (each row
+	is a seperate group, all rows are in same group).
 
-  * clamtest: wrongly used frequencies instead of the counts
-  when calculating sample coverage to test x < coverage.limit. 
-  No detectable differences were produced when rerunning 
-  examples from Chazdon et al. 2011 (Ecology, 92, 1332--1343)
-  and vegan help page.
+	* scoverage: new function for sample coverage based 
+	correction for calculation of relative frequencies in count
+	community matrices (Good 1953, Biometrika 40, 237--264).
 
+	* clamtest: wrongly used frequencies instead of the counts
+	when calculating sample coverage to test x < coverage.limit. 
+	No detectable differences were produced when rerunning 
+	examples from Chazdon et al. 2011 (Ecology, 92, 1332--1343)
+	and vegan help page.
+
 	* Opened a new version with the CRAN release of vegan 2.0-3 on
 	March 3, 2012.
 



More information about the Vegan-commits mailing list