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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Feb 26 15:55:25 CET 2012


Author: jarioksa
Date: 2012-02-26 15:55:25 +0100 (Sun, 26 Feb 2012)
New Revision: 2107

Modified:
   pkg/vegan/R/print.monoMDS.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/monoMDS.Rd
Log:
    scores.monoMDS did not know 'choices'

Modified: pkg/vegan/R/print.monoMDS.R
===================================================================
--- pkg/vegan/R/print.monoMDS.R	2012-02-26 12:31:21 UTC (rev 2106)
+++ pkg/vegan/R/print.monoMDS.R	2012-02-26 14:55:25 UTC (rev 2107)
@@ -40,9 +40,12 @@
 }
 
 `scores.monoMDS` <-
-    function(x, ...)
+    function(x, choices = NA, ...)
 {
-    x$points
+    if (any(is.na(choices)))
+        x$points
+    else
+        x$points[, choices, drop = FALSE]
 }
 
 `plot.monoMDS` <-

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-02-26 12:31:21 UTC (rev 2106)
+++ pkg/vegan/inst/ChangeLog	2012-02-26 14:55:25 UTC (rev 2107)
@@ -4,8 +4,15 @@
 
 Version 2.1-13 (opened February 23, 2012)
 
-	* vegdist: Added Cao dissimilarity (CYd).
+	* scores: expand description of the default method to avoid
+	confusion with specific vegan methods.
 	
+	* scores.monoMDS: did not know 'choices' and hence plot() was also
+	unable to choose dimensions. 
+	
+	* vegdist: Added Cao dissimilarity (CYd). Thanks to Yong Cao for
+	consultation. 
+	
 Version 2.1-12 (closed February 23, 2012)
 
 	* scores.default: failed if users asked scores of non-existing

Modified: pkg/vegan/man/monoMDS.Rd
===================================================================
--- pkg/vegan/man/monoMDS.Rd	2012-02-26 12:31:21 UTC (rev 2106)
+++ pkg/vegan/man/monoMDS.Rd	2012-02-26 14:55:25 UTC (rev 2107)
@@ -18,7 +18,7 @@
     threshold = 0.8, maxit = 200, weakties = TRUE, stress = 1,
     scaling = TRUE, pc = TRUE, smin = 0.00001, sfgrmin = 0.00001, 
     sratmax=0.99999, ...) 
-\method{scores}{monoMDS}(x, ...)
+\method{scores}{monoMDS}(x, choices = NA, ...)
 \method{plot}{monoMDS}(x, choices = c(1,2), type = "t", ...)
 }
 
@@ -57,8 +57,10 @@
     \code{sratmax} (but is still \eqn{< 1}).}
 
   \item{x}{A \code{monoMDS} result.}
-  \item{choices}{Dimensions plotted.}
 
+  \item{choices}{Dimensions returned or plotted. The default \code{NA}
+    returns all dimensions. }
+
   \item{type}{The type of the plot: \code{"t"} for text, \code{"p"}
     for points, and \code{"n"} for none.}
 



More information about the Vegan-commits mailing list