[Vegan-commits] r1887 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 26 08:35:33 CEST 2011
Author: psolymos
Date: 2011-09-26 08:35:32 +0200 (Mon, 26 Sep 2011)
New Revision: 1887
Modified:
pkg/vegan/R/permatfull.R
pkg/vegan/R/permatswap.R
pkg/vegan/R/print.permat.R
pkg/vegan/R/print.summary.permat.R
Log:
permat* passes commsim name for transparency
Modified: pkg/vegan/R/permatfull.R
===================================================================
--- pkg/vegan/R/permatfull.R 2011-09-25 18:23:57 UTC (rev 1886)
+++ pkg/vegan/R/permatfull.R 2011-09-26 06:35:32 UTC (rev 1887)
@@ -48,7 +48,7 @@
out <- list(call=match.call(), orig=m, perm=perm)
attr(out, "mtype") <- mtype
attr(out, "ptype") <- "full"
- attr(out, "method") <- NA
+ attr(out, "method") <- ALGO
attr(out, "fixedmar") <- fixedmar
attr(out, "times") <- times
attr(out, "shuffle") <- shuffle
Modified: pkg/vegan/R/permatswap.R
===================================================================
--- pkg/vegan/R/permatswap.R 2011-09-25 18:23:57 UTC (rev 1886)
+++ pkg/vegan/R/permatswap.R 2011-09-26 06:35:32 UTC (rev 1887)
@@ -80,7 +80,7 @@
out <- list(call=match.call(), orig=m, perm=perm)
attr(out, "mtype") <- mtype
attr(out, "ptype") <- "swap"
- attr(out, "method") <- method
+ attr(out, "method") <- ALGO
attr(out, "fixedmar") <- if (method == "swsh") "none" else fixedmar
attr(out, "times") <- times
attr(out, "shuffle") <- if (method == "swsh") shuffle else NA
Modified: pkg/vegan/R/print.permat.R
===================================================================
--- pkg/vegan/R/print.permat.R 2011-09-25 18:23:57 UTC (rev 1886)
+++ pkg/vegan/R/print.permat.R 2011-09-26 06:35:32 UTC (rev 1887)
@@ -4,12 +4,12 @@
{
cat("Object of class 'permat' with ", attr(x, "times"), " simulations\n", sep="")
cat("\nMatrix type:", attr(x, "mtype"), "\nPermutation type:", attr(x, "ptype"))
+ cat("\nMethod: ", attr(x, "method"), sep = "")
if (attr(x, "ptype") == "swap") {
- cat("\nMethod: ", attr(x, "method"), sep = "")
- if (attr(x, "method") != "quasiswap") {
+ if (!is.na(attr(x, "burnin")))
cat(", burnin: ", attr(x, "burnin"), sep = "")
+ if (!is.na(attr(x, "thin")))
cat(", thin: ", attr(x, "thin"), sep = "")
- }
}
cat("\nRestricted:", attr(x, "is.strat"), "\nFixed margins:", attr(x, "fixedmar"))
if (!is.na(attr(x, "shuffle"))) {
@@ -20,8 +20,4 @@
}
cat("\n")
invisible(x)
-# cat("\n\nMatrix dimensions:", nrow(x$orig), "rows,", ncol(x$orig), "columns")
-# cat("\nSum of original matrix:", sum(x$orig))
-# cat("\nFill of original matrix:", round(sum(x$orig>0)/(nrow(x$orig)*ncol(x$orig)),digits))
-# cat("\nNumber of permuted matrices:", attr(x, "times"),"\n")
}
Modified: pkg/vegan/R/print.summary.permat.R
===================================================================
--- pkg/vegan/R/print.summary.permat.R 2011-09-25 18:23:57 UTC (rev 1886)
+++ pkg/vegan/R/print.summary.permat.R 2011-09-26 06:35:32 UTC (rev 1887)
@@ -6,12 +6,12 @@
cat("Summary of object of class 'permat'\n\nCall: ")
print(x$x$call)
cat("\nMatrix type:", attr(x$x, "mtype"), "\nPermutation type:", attr(x$x, "ptype"))
- if (attr(x$x, "ptype") == "swap") {
- cat("\nMethod: ", attr(x$x, "method"), sep = "")
- if (attr(x$x, "method") != "quasiswap") {
- cat(", burnin: ", attr(x$x, "burnin"), sep = "")
- cat(", thin: ", attr(x$x, "thin"), sep = "")
- }
+ cat("\nMethod: ", attr(x, "method"), sep = "")
+ if (attr(x, "ptype") == "swap") {
+ if (!is.na(attr(x, "burnin")))
+ cat(", burnin: ", attr(x, "burnin"), sep = "")
+ if (!is.na(attr(x, "thin")))
+ cat(", thin: ", attr(x, "thin"), sep = "")
}
cat("\nRestricted:", attr(x$x, "is.strat"), "\nFixed margins:", attr(x$x, "fixedmar"))
if (!is.na(attr(x$x, "shuffle"))) {
More information about the Vegan-commits
mailing list