[Vegan-commits] r846 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 1 10:30:56 CEST 2009
Author: jarioksa
Date: 2009-06-01 10:30:55 +0200 (Mon, 01 Jun 2009)
New Revision: 846
Modified:
pkg/vegan/R/adonis.R
pkg/vegan/R/anosim.R
pkg/vegan/R/factorfit.R
pkg/vegan/R/mantel.R
pkg/vegan/R/vectorfit.R
Log:
remove patronizing if(permutations %% 100 == 0) permutations <- permutations - 1
Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R 2009-05-31 17:59:08 UTC (rev 845)
+++ pkg/vegan/R/adonis.R 2009-06-01 08:30:55 UTC (rev 846)
@@ -8,11 +8,6 @@
## variables. data is the data frame from which A, B, and C would
## be drawn.
TOL <- 1e-7
- ## Set no. of permutations to x-1 if x is an even hundred
- if (permutations %% 100 == 0) {
- permutations <- permutations - 1
- warning("Setting no. of permutations to ", permutations)
- }
Terms <- terms(formula, data = data)
lhs <- formula[[2]]
lhs <- eval(lhs, data, parent.frame()) # to force evaluation
Modified: pkg/vegan/R/anosim.R
===================================================================
--- pkg/vegan/R/anosim.R 2009-05-31 17:59:08 UTC (rev 845)
+++ pkg/vegan/R/anosim.R 2009-06-01 08:30:55 UTC (rev 846)
@@ -28,8 +28,6 @@
cl.vec[within] <- levels(grouping)[grouping[take]]
cl.vec <- factor(cl.vec, levels = c("Between", levels(grouping)))
if (permutations) {
- if (permutations %% 100 == 0)
- permutations <- permutations - 1
perm <- rep(0, permutations)
for (i in 1:permutations) {
take <- permuted.index(N, strata)
Modified: pkg/vegan/R/factorfit.R
===================================================================
--- pkg/vegan/R/factorfit.R 2009-05-31 17:59:08 UTC (rev 845)
+++ pkg/vegan/R/factorfit.R 2009-06-01 08:30:55 UTC (rev 846)
@@ -33,8 +33,6 @@
r.this <- 1 - invar/totvar
r <- c(r, r.this)
if (permutations) {
- if (permutations %% 100 == 0)
- permutations <- permutations - 1
A <- as.integer(P[[i]])
NL <- nlevels(P[[i]])
tmp <- rep(NA, permutations)
Modified: pkg/vegan/R/mantel.R
===================================================================
--- pkg/vegan/R/mantel.R 2009-05-31 17:59:08 UTC (rev 845)
+++ pkg/vegan/R/mantel.R 2009-06-01 08:30:55 UTC (rev 846)
@@ -8,8 +8,6 @@
statistic <- as.numeric(tmp$estimate)
variant <- tmp$method
if (permutations) {
- if (permutations %% 100 == 0)
- permutatoins <- permutations - 1
N <- attributes(xdis)$Size
perm <- rep(0, permutations)
for (i in 1:permutations) {
Modified: pkg/vegan/R/vectorfit.R
===================================================================
--- pkg/vegan/R/vectorfit.R 2009-05-31 17:59:08 UTC (rev 845)
+++ pkg/vegan/R/vectorfit.R 2009-06-01 08:30:55 UTC (rev 846)
@@ -29,8 +29,6 @@
colnames(heads) <- paste("Dim", 1:nc, sep = "")
else colnames(heads) <- colnames(X)
if (permutations) {
- if (permutations %% 100 == 0)
- permutations <- permutations - 1
nr <- nrow(X)
permstore <- matrix(nrow = permutations, ncol = ncol(P))
for (i in 1:permutations) {
More information about the Vegan-commits
mailing list