[Vegan-commits] r2311 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Oct 7 12:31:04 CEST 2012
Author: gsimpson
Date: 2012-10-07 12:31:04 +0200 (Sun, 07 Oct 2012)
New Revision: 2311
Modified:
pkg/vegan/R/permutest.betadisper.R
Log:
remove comments with .Internal equivalents
Modified: pkg/vegan/R/permutest.betadisper.R
===================================================================
--- pkg/vegan/R/permutest.betadisper.R 2012-10-07 09:04:20 UTC (rev 2310)
+++ pkg/vegan/R/permutest.betadisper.R 2012-10-07 10:31:04 UTC (rev 2311)
@@ -4,10 +4,10 @@
t.statistic <- function(x, y) {
m <- length(x)
n <- length(y)
- 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))
+ xbar <- mean(x)
+ ybar <- mean(y)
+ xvar <- var(x)
+ yvar <- var(y)
pooled <- sqrt(((m-1)*xvar + (n-1)*yvar) / (m+n-2))
(xbar - ybar) / (pooled * sqrt(1/m + 1/n))
}
@@ -33,7 +33,6 @@
x$distances[x$group == z[2]])})
}
for(i in seq(along = res[-1])) {
- ##perm <- permuted.index2(nobs, control = control)
perm <- shuffle(nobs, control = control)
perm.resid <- resids[perm]
f <- qr.fitted(mod.Q, perm.resid)
More information about the Vegan-commits
mailing list