[Vegan-commits] r2100 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Feb 20 20:18:39 CET 2012
Author: jarioksa
Date: 2012-02-20 20:18:39 +0100 (Mon, 20 Feb 2012)
New Revision: 2100
Modified:
pkg/vegan/R/simper.R
Log:
fix print.summary.simper
Modified: pkg/vegan/R/simper.R
===================================================================
--- pkg/vegan/R/simper.R 2012-02-19 19:33:15 UTC (rev 2099)
+++ pkg/vegan/R/simper.R 2012-02-20 19:18:39 UTC (rev 2100)
@@ -117,7 +117,7 @@
function(x, digits = attr(x, "digits"), ...)
{
signif.stars <- getOption("show.signif.stars") && attr(x, "permutations") > 0
- starprint <- function(z, ...) {
+ starprint <- function(z) {
if (signif.stars && any(z$p < 0.1)) {
stars <- symnum(z$p, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1),
symbols = c("***", "**", "*", ".", " "))
@@ -125,8 +125,11 @@
}
z
}
- out <- lapply(x, starprint, digits = digits, ...)
- print(out)
+ out <- lapply(x, starprint)
+ for (nm in names(out)) {
+ cat("\nContrast:", nm, "\n\n")
+ print(out[[nm]], digits = digits, ...)
+ }
if (signif.stars && any(sapply(x, function(z) z$p) < 0.1)) {
leg <- attr(symnum(1, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1),
symbols = c("***", "**", "*", ".", " ")), "legend")
@@ -136,4 +139,3 @@
cat("P-values based on", np, "permutations\n")
invisible(x)
}
-
More information about the Vegan-commits
mailing list