[Vegan-commits] r1962 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 28 18:28:40 CEST 2011


Author: jarioksa
Date: 2011-10-28 18:28:40 +0200 (Fri, 28 Oct 2011)
New Revision: 1962

Modified:
   pkg/vegan/R/adonis.R
   pkg/vegan/R/mrpp.R
Log:
fix sloppy copy/paste of r1953

Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R	2011-10-28 07:02:28 UTC (rev 1961)
+++ pkg/vegan/R/adonis.R	2011-10-28 16:28:40 UTC (rev 1962)
@@ -100,7 +100,7 @@
         p <- t(as.matrix(permutations))
         if (nrow(p) != n)
             stop(gettextf("'permutations' have %d columns, but data have %d rows",
-                          ncol(permat), n))
+                          ncol(p), n))
         permutations <- ncol(p)
     }
     

Modified: pkg/vegan/R/mrpp.R
===================================================================
--- pkg/vegan/R/mrpp.R	2011-10-28 07:02:28 UTC (rev 1961)
+++ pkg/vegan/R/mrpp.R	2011-10-28 16:28:40 UTC (rev 1962)
@@ -46,8 +46,8 @@
         perms <- apply(permutations, 1, function(indx) grouping[indx])
         permutations <- ncol(perms)
         if (nrow(perms) != N)
-            stop(fettextf("'permutations' have %d columns, but data have %d rows",
-                          ncol(permat), n))
+            stop(gettextf("'permutations' have %d columns, but data have %d rows",
+                          ncol(perms), N))
     }
     m.ds <- apply(perms, 2, function(x) mrpp.perms(x, dmat, indls, 
         w))



More information about the Vegan-commits mailing list