[Vegan-commits] r1578 - in pkg/vegan: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 7 21:23:10 CEST 2011


Author: jarioksa
Date: 2011-04-07 21:23:10 +0200 (Thu, 07 Apr 2011)
New Revision: 1578

Modified:
   pkg/vegan/R/metaMDSdist.R
   pkg/vegan/man/metaMDS.Rd
Log:
new default: metaMDSdist(..., zerodist=ignore)

Modified: pkg/vegan/R/metaMDSdist.R
===================================================================
--- pkg/vegan/R/metaMDSdist.R	2011-04-07 16:19:59 UTC (rev 1577)
+++ pkg/vegan/R/metaMDSdist.R	2011-04-07 19:23:10 UTC (rev 1578)
@@ -1,6 +1,6 @@
 `metaMDSdist` <-
     function (comm, distance = "bray", autotransform = TRUE, noshare = 0.1, 
-              trace = 1, commname, zerodist = "fail", distfun = vegdist, 
+              trace = 1, commname, zerodist = "ignore", distfun = vegdist, 
               ...) 
 {
     ## metaMDSdist should get a raw data matrix, but if it gets a
@@ -32,7 +32,7 @@
     call <- attr(dis, "call")
     call[[1]] <- as.name(distname)
     attr(dis, "call") <- call
-    if (any(dis <= 0, na.rm = TRUE)) {
+    if (zerodist != "ignore" && any(dis <= 0, na.rm = TRUE)) {
         if (zerodist == "fail") 
             stop("Zero dissimilarities are not allowed")
         else if (zerodist == "add") {

Modified: pkg/vegan/man/metaMDS.Rd
===================================================================
--- pkg/vegan/man/metaMDS.Rd	2011-04-07 16:19:59 UTC (rev 1577)
+++ pkg/vegan/man/metaMDS.Rd	2011-04-07 19:23:10 UTC (rev 1578)
@@ -36,7 +36,7 @@
 \method{scores}{metaMDS}(x, display = c("sites", "species"), shrink = FALSE, 
         choices, ...)
 metaMDSdist(comm, distance = "bray", autotransform = TRUE, noshare = 0.1, 
-    trace = 1, commname, zerodist = "fail", distfun = vegdist, ...)
+    trace = 1, commname, zerodist = "ignore", distfun = vegdist, ...)
 metaMDSiter(dist, k = 2, trymax = 20, trace = 1, plot = FALSE, previous.best, 
     engine = "monoMDS", ...)   
 initMDS(x, k=2)



More information about the Vegan-commits mailing list