[Vegan-commits] r1934 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 5 17:32:24 CEST 2011


Author: jarioksa
Date: 2011-10-05 17:32:23 +0200 (Wed, 05 Oct 2011)
New Revision: 1934

Modified:
   pkg/vegan/R/print.commsim.R
   pkg/vegan/R/print.nullmodel.R
   pkg/vegan/R/print.simmat.R
Log:
make a difference between count (non-negative integer) and abundance (non-negative real)

Modified: pkg/vegan/R/print.commsim.R
===================================================================
--- pkg/vegan/R/print.commsim.R	2011-10-05 15:23:12 UTC (rev 1933)
+++ pkg/vegan/R/print.commsim.R	2011-10-05 15:32:23 UTC (rev 1934)
@@ -1,8 +1,11 @@
 print.commsim <- function(x, ...) {
     cat("An object of class", dQuote(class(x)[1L]), "\n")
     isSeq <- ifelse(x$isSeq, "sequential", "non-sequential")
-    binary <- ifelse(x$binary, "binary", "count")
+    if(x$binary)
+        kind <- "binary"
+    else
+        kind <- ifelse(x$mode == "integer", "count", "abundance")
     cat(sQuote(x$method), " method (", 
-        binary, ", ", isSeq, ", ", x$mode, " mode)\n\n", sep="")
+        kind, ", ", isSeq, ", ", x$mode, " mode)\n\n", sep="")
     invisible(x)
 }

Modified: pkg/vegan/R/print.nullmodel.R
===================================================================
--- pkg/vegan/R/print.nullmodel.R	2011-10-05 15:23:12 UTC (rev 1933)
+++ pkg/vegan/R/print.nullmodel.R	2011-10-05 15:32:23 UTC (rev 1934)
@@ -1,9 +1,12 @@
 print.nullmodel <- function(x, ...) {
     isSeq <- ifelse(x$commsim$isSeq, "sequential", "non-sequential")
-    binary <- ifelse(x$commsim$binary, "binary", "count")
+    if (x$commsim$binary)
+        kind <- "binary"
+    else
+        kind <- ifelse(x$commsim$mode == "integer", "count", "abundance")
     cat("An object of class", dQuote(class(x)[1L]), "\n")
     cat(sQuote(x$commsim$method), " method (", 
-        binary, ", ", isSeq, ")\n", sep="")
+        kind, ", ", isSeq, ")\n", sep="")
     cat(x$nrow, "x", x$ncol, "matrix\n")
     if (x$commsim$isSeq)
         cat("Iterations =", x$iter, "\n\n") else cat("\n")

Modified: pkg/vegan/R/print.simmat.R
===================================================================
--- pkg/vegan/R/print.simmat.R	2011-10-05 15:23:12 UTC (rev 1933)
+++ pkg/vegan/R/print.simmat.R	2011-10-05 15:32:23 UTC (rev 1934)
@@ -1,10 +1,13 @@
 print.simmat <- function(x, ...) {
     isSeq <- ifelse(attr(x, "isSeq"), "sequential", "non-sequential")
-    binary <- ifelse(attr(x, "binary"), "binary", "count")
+    if (attr(x, "binary"))
+        kind <- "binary"
+    else
+        kind <- ifelse(attr(x, "mode") == "integer", "count", "abundance")
     d <- dim(x)
     cat("An object of class", dQuote(class(x)[1L]), "\n")
     cat(sQuote(attr(x, "method")), " method (", 
-        binary, ", ", isSeq, ")\n", sep="")
+        kind, ", ", isSeq, ")\n", sep="")
     cat(d[1L], "x", d[2L], "matrix\n")
     cat("Number of permuted matrices =", d[3L], "\n")
     if (attr(x, "isSeq")) {



More information about the Vegan-commits mailing list