[Vegan-commits] r2791 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 1 18:07:03 CET 2013
Author: jarioksa
Date: 2013-12-01 18:07:03 +0100 (Sun, 01 Dec 2013)
New Revision: 2791
Modified:
pkg/vegan/R/anovacca.R
pkg/vegan/R/howHead.R
Log:
howHead returns no. of permutations, and we use that in anova display instead of N.perm column
Modified: pkg/vegan/R/anovacca.R
===================================================================
--- pkg/vegan/R/anovacca.R 2013-12-01 16:44:30 UTC (rev 2790)
+++ pkg/vegan/R/anovacca.R 2013-12-01 17:07:03 UTC (rev 2791)
@@ -77,14 +77,12 @@
Fval <- c(tst$F.0, NA)
Pval <- (sum(tst$F.perm >= tst$F.0) + 1)/(tst$nperm + 1)
Pval <- c(Pval, NA)
- nperm <- c(tst$nperm, NA)
- table <- data.frame(tst$df, tst$chi, Fval, nperm, Pval)
+ table <- data.frame(tst$df, tst$chi, Fval, Pval)
is.rda <- inherits(object, "rda")
colnames(table) <- c("Df", ifelse(is.rda, "Var", "Chisq"),
- "F", "N.Perm", "Pr(>F)")
+ "F", "Pr(>F)")
head <- paste0("Permutation test for ", tst$method, " under ",
- tst$model, " model\n", howHead(control),
- "Number of permutations: ", tst$nperm, "\n")
+ tst$model, " model\n", howHead(control))
mod <- paste("Model:", c(object$call))
structure(table, heading = c(head, mod), Random.seed = seed,
control = control,
Modified: pkg/vegan/R/howHead.R
===================================================================
--- pkg/vegan/R/howHead.R 2013-12-01 16:44:30 UTC (rev 2790)
+++ pkg/vegan/R/howHead.R 2013-12-01 17:07:03 UTC (rev 2791)
@@ -46,6 +46,6 @@
head <- paste0(head, sprintf(ngettext(nc, " %d column",
" %d columns"), nc))
}
- head <- paste0(head, "\n")
+ head <- paste0(head, "\nNumber of permutations: ", getNperm(x), "\n")
head
}
More information about the Vegan-commits
mailing list