[Vegan-commits] r2478 - in branches/2.0: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 9 16:35:10 CET 2013


Author: jarioksa
Date: 2013-03-09 16:35:10 +0100 (Sat, 09 Mar 2013)
New Revision: 2478

Modified:
   branches/2.0/R/wcmdscale.R
   branches/2.0/inst/ChangeLog
   branches/2.0/man/wcmdscale.Rd
Log:
merge r2476: return only a scores matrix from wcmdscale, unless extra items are requested

Modified: branches/2.0/R/wcmdscale.R
===================================================================
--- branches/2.0/R/wcmdscale.R	2013-03-09 15:30:32 UTC (rev 2477)
+++ branches/2.0/R/wcmdscale.R	2013-03-09 15:35:10 UTC (rev 2478)
@@ -9,7 +9,7 @@
     if (add)
         .NotYetUsed("add")
     ## Force eig=TRUE if add, x.ret or !missing(w)
-    if(add || x.ret || !missing(w))
+    if(x.ret)
         eig <- TRUE
     ZERO <- sqrt(.Machine$double.eps)
     if (!inherits(d, "dist")) {
@@ -50,7 +50,7 @@
     ## GOF for real and all axes
     GOF <- c(sum(ev)/sum(abs(e$values)),
              sum(ev)/sum(e$values[e$values > 0]))
-    if (eig || x.ret || add) {
+    if (eig || x.ret) {
         colnames(points) <- paste("Dim", seq_len(NCOL(points)), sep="") 
         out <- list(points = points, eig = if (eig) e$values,
                     x = if (x.ret) m, ac = NA, GOF = GOF, weights = w,

Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2013-03-09 15:30:32 UTC (rev 2477)
+++ branches/2.0/inst/ChangeLog	2013-03-09 15:35:10 UTC (rev 2478)
@@ -4,6 +4,8 @@
 
 Version 2.0-7 (opened February 17, 2013)
 
+	* merge r2476: take back part of 2434 and return matrix from
+	wcmdscale unless eigenvalues are requested.
 	* merge r2469, 2470: do not use u.eig & v.eig.
 	* merge r2468: tabasco checks against negative data.
 	* merge r2462: fix "asymp" model in fitspecaccum.

Modified: branches/2.0/man/wcmdscale.Rd
===================================================================
--- branches/2.0/man/wcmdscale.Rd	2013-03-09 15:30:32 UTC (rev 2477)
+++ branches/2.0/man/wcmdscale.Rd	2013-03-09 15:35:10 UTC (rev 2478)
@@ -49,17 +49,18 @@
 
   With default options, the function returns only a matrix of scores
   scaled by eigenvalues for all real axes. If the function is called
-  with \code{eig = TRUE} or \code{x.ret = TRUE} or with weights
-  \code{w}, the function returns an object of class \code{"wcmdscale"}
-  with \code{print}, \code{plot}, \code{scores}, \code{\link{eigenvals}}
-  and \code{\link{stressplot}} methods, and described in section Value.
-  }
+  with \code{eig = TRUE} or \code{x.ret = TRUE}, the function returns
+  an object of class \code{"wcmdscale"} with \code{print},
+  \code{plot}, \code{scores}, \code{\link{eigenvals}} and
+  \code{\link{stressplot}} methods, and described in section Value.  
+}
 
 \value{ If \code{eig = FALSE} and \code{x.ret = FALSE} (default), a
-  matrix with \code{k} columns whose rows give the coordinates of the
-  points chosen to represent the dissimilarities.  Otherwise, an
-  object of class \code{wcmdscale} containing the components that are
-  mostly similar as in \code{\link{cmdscale}}:
+  matrix with \code{k} columns whose rows give the coordinates of
+  points corresponding to positive eignenvalues.  Otherwise, an object
+  of class \code{wcmdscale} containing the components that are mostly
+  similar as in \code{\link{cmdscale}}:
+  
   \item{points}{a matrix with \code{k} columns whose rows give the
     coordinates of the points chosen to represent the
     dissimilarities.}



More information about the Vegan-commits mailing list