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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 9 22:03:04 CET 2012


Author: gsimpson
Date: 2012-02-09 22:03:03 +0100 (Thu, 09 Feb 2012)
New Revision: 2079

Modified:
   pkg/vegan/R/permutest.betadisper.R
Log:
remove .Internal calls

Modified: pkg/vegan/R/permutest.betadisper.R
===================================================================
--- pkg/vegan/R/permutest.betadisper.R	2012-02-09 16:45:22 UTC (rev 2078)
+++ pkg/vegan/R/permutest.betadisper.R	2012-02-09 21:03:03 UTC (rev 2079)
@@ -4,10 +4,10 @@
     t.statistic <- function(x, y) {
         m <- length(x)
         n <- length(y)
-        xbar <- .Internal(mean(x))
-        ybar <- .Internal(mean(y))
-        xvar <- .Internal(cov(x, NULL, 1, FALSE))
-        yvar <- .Internal(cov(y, NULL, 1, FALSE))
+        xbar <- mean(x) ## .Internal(mean(x))
+        ybar <- mean(y) ## .Internal(mean(y))
+        xvar <- var(x)  ## .Internal(cov(x, NULL, 1, FALSE))
+        yvar <- var(y)  ## .Internal(cov(y, NULL, 1, FALSE))
         pooled <- sqrt(((m-1)*xvar + (n-1)*yvar) / (m+n-2))
         (xbar - ybar) / (pooled * sqrt(1/m + 1/n))
     }



More information about the Vegan-commits mailing list