[Vegan-commits] r2152 - in branches/2.0: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun May 6 15:58:26 CEST 2012


Author: jarioksa
Date: 2012-05-06 15:58:26 +0200 (Sun, 06 May 2012)
New Revision: 2152

Modified:
   branches/2.0/R/hiersimu.default.R
   branches/2.0/R/hiersimu.formula.R
   branches/2.0/R/multipart.default.R
   branches/2.0/R/multipart.formula.R
   branches/2.0/inst/ChangeLog
Log:
merge r2144: do not assume constant gamma diversity in hierpart and multipart

Modified: branches/2.0/R/hiersimu.default.R
===================================================================
--- branches/2.0/R/hiersimu.default.R	2012-05-06 13:55:15 UTC (rev 2151)
+++ branches/2.0/R/hiersimu.default.R	2012-05-06 13:58:26 UTC (rev 2152)
@@ -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: branches/2.0/R/hiersimu.formula.R
===================================================================
--- branches/2.0/R/hiersimu.formula.R	2012-05-06 13:55:15 UTC (rev 2151)
+++ branches/2.0/R/hiersimu.formula.R	2012-05-06 13:58:26 UTC (rev 2152)
@@ -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: branches/2.0/R/multipart.default.R
===================================================================
--- branches/2.0/R/multipart.default.R	2012-05-06 13:55:15 UTC (rev 2151)
+++ branches/2.0/R/multipart.default.R	2012-05-06 13:58:26 UTC (rev 2152)
@@ -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: branches/2.0/R/multipart.formula.R
===================================================================
--- branches/2.0/R/multipart.formula.R	2012-05-06 13:55:15 UTC (rev 2151)
+++ branches/2.0/R/multipart.formula.R	2012-05-06 13:58:26 UTC (rev 2152)
@@ -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: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2012-05-06 13:55:15 UTC (rev 2151)
+++ branches/2.0/inst/ChangeLog	2012-05-06 13:58:26 UTC (rev 2152)
@@ -4,6 +4,8 @@
 
 Version 2.0-4 (opened March 9, 2012)
 
+	* merge r2144: hiersimu and multipart do not assume constant
+	gamma.  Similar change was made in r2132 to adipart.
 	* merge r2143: formula method for adipart/hiersimu/multipart.
 	NAMESPACE needed manual merge (edited patch from diff).
 	* merge r2139: clamtest coverage threshold fix.



More information about the Vegan-commits mailing list