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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 6 16:56:09 CEST 2011


Author: jarioksa
Date: 2011-04-06 16:56:09 +0200 (Wed, 06 Apr 2011)
New Revision: 1573

Modified:
   pkg/vegan/R/metaMDS.R
   pkg/vegan/R/metaMDSiter.R
   pkg/vegan/R/print.metaMDS.R
   pkg/vegan/man/metaMDS.Rd
Log:
metaMDS return all available information and prints more nicely

Modified: pkg/vegan/R/metaMDS.R
===================================================================
--- pkg/vegan/R/metaMDS.R	2011-04-05 17:53:55 UTC (rev 1572)
+++ pkg/vegan/R/metaMDS.R	2011-04-06 14:56:09 UTC (rev 1573)
@@ -49,6 +49,6 @@
     out$call <- match.call()
     if (is.null(out$data))
         out$data <- commname
-    class(out) <- "metaMDS"
+    class(out) <- c("metaMDS", class(out))
     out
 }

Modified: pkg/vegan/R/metaMDSiter.R
===================================================================
--- pkg/vegan/R/metaMDSiter.R	2011-04-05 17:53:55 UTC (rev 1572)
+++ pkg/vegan/R/metaMDSiter.R	2011-04-06 14:56:09 UTC (rev 1573)
@@ -95,9 +95,12 @@
     if (!missing(previous.best) && inherits(previous.best, "metaMDS")) {
         tries <- tries + previous.best$tries
     }
-    out <- list(points = s0$points, dims = k, stress = s0$stress, 
-                data = attr(dist, "commname"),
-                distance = attr(dist, "method"), converged = converged,
-                tries = tries, engine = engine)
+    out <- s0
+    out$ndim = k
+    out$data <- attr(dist, "commname")
+    out$distance <- attr(dist, "method")
+    out$converged <- converged
+    out$tries <- tries
+    out$engine <- engine
     out
 }

Modified: pkg/vegan/R/print.metaMDS.R
===================================================================
--- pkg/vegan/R/print.metaMDS.R	2011-04-05 17:53:55 UTC (rev 1572)
+++ pkg/vegan/R/print.metaMDS.R	2011-04-06 14:56:09 UTC (rev 1573)
@@ -3,14 +3,13 @@
 {
     cat("\nCall:\n")
     cat(deparse(x$call), "\n\n")
-    cat("Nonmetric Multidimensional Scaling using ")
     if (x$engine == "monoMDS")
-        cat("monoMDS\n\n")
+        cat(x$model, "Multidimensional Scaling using monoMDS\n\n")
     else if (x$engine == "isoMDS")
-        cat("isoMDS (MASS package)\n\n")
+        cat("non-metric Multidimensional Scaling using isoMDS (MASS package)\n\n")
     cat("Data:    ", x$data, "\n")
     cat("Distance:", x$distance, "\n\n")
-    cat("Dimensions:", x$dims, "\n")
+    cat("Dimensions:", x$ndim, "\n")
     cat("Stress:    ", x$stress, "\n")
     if (x$converged) 
         cat("Two convergent solutions found after", x$tries, 

Modified: pkg/vegan/man/metaMDS.Rd
===================================================================
--- pkg/vegan/man/metaMDS.Rd	2011-04-05 17:53:55 UTC (rev 1572)
+++ pkg/vegan/man/metaMDS.Rd	2011-04-06 14:56:09 UTC (rev 1573)
@@ -214,21 +214,17 @@
   }
 }
 
-\value{
-  Function \code{metaMDS} returns an object of class
+\value{ Function \code{metaMDS} returns an object of class
   \code{metaMDS}. The final site ordination is stored in the item
-  \code{points}, and species ordination in the item \code{species}. The
-  other items store the information on the steps taken by the
-  function. The object has \code{print}, \code{plot}, \code{points} and
-  \code{text} methods.
-  Functions \code{metaMDSdist} and \code{metaMDSredist} return
-  \code{\link{vegdist}} objects.
-  Function \code{initMDS} returns a random
-  configuration which is intended to be used within
-  \code{\link[MASS]{isoMDS}} only.  Functions \code{metaMDSiter} and
-  \code{postMDS} returns the result of \code{\link[MASS]{isoMDS}} with
-  updated configuration.
-}
+  \code{points}, and species ordination in the item
+  \code{species}. The other items store the information on the steps
+  taken by the function. The object has \code{print}, \code{plot},
+  \code{points} and \code{text} methods.  Functions \code{metaMDSdist}
+  and \code{metaMDSredist} return \code{\link{vegdist}} objects.
+  Function \code{initMDS} returns a random configuration which is
+  intended to be used within \code{\link[MASS]{isoMDS}} only.
+  Functions \code{metaMDSiter} and \code{postMDS} returns the result
+  of NMDS with updated configuration.  }
 
 
 \references{



More information about the Vegan-commits mailing list