[Vegan-commits] r2665 - pkg/permute/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 7 23:16:20 CET 2013
Author: gsimpson
Date: 2013-11-07 23:16:20 +0100 (Thu, 07 Nov 2013)
New Revision: 2665
Modified:
pkg/permute/R/allPerms.R
pkg/permute/R/print.summary.allPerms.R
Log:
summary.allperms print method now prints the permutation design; all perms returns this design as an attribute 'control'
Modified: pkg/permute/R/allPerms.R
===================================================================
--- pkg/permute/R/allPerms.R 2013-11-07 21:15:05 UTC (rev 2664)
+++ pkg/permute/R/allPerms.R 2013-11-07 22:16:20 UTC (rev 2665)
@@ -64,6 +64,7 @@
control$nperm <- control$nperm - 1
}
class(out) <- "allPerms"
+ attr(out, "control") <- control
attr(out, "observed") <- observed
out
}
Modified: pkg/permute/R/print.summary.allPerms.R
===================================================================
--- pkg/permute/R/print.summary.allPerms.R 2013-11-07 21:15:05 UTC (rev 2664)
+++ pkg/permute/R/print.summary.allPerms.R 2013-11-07 22:16:20 UTC (rev 2665)
@@ -9,9 +9,9 @@
prefix = "\t"))
cat("\nPermutation Scheme:\n")
print(control)
- cat(paste("Contains observed ordering?:", ifelse(observed, "Yes", "No"),
+ cat("\nAll permutations:\n")
+ writeLines(paste("Contains observed ordering?:", ifelse(observed, "Yes", "No"),
"\n"))
- cat("\nAll permutations:\n")
print(x)
return(invisible(x))
}
More information about the Vegan-commits
mailing list