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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 9 12:26:19 CET 2013


Author: jarioksa
Date: 2013-03-09 12:26:19 +0100 (Sat, 09 Mar 2013)
New Revision: 2476

Modified:
   pkg/vegan/R/wcmdscale.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/wcmdscale.Rd
Log:
allow getting pure scores matrix of weighted wcmdscale

Modified: pkg/vegan/R/wcmdscale.R
===================================================================
--- pkg/vegan/R/wcmdscale.R	2013-03-08 09:15:18 UTC (rev 2475)
+++ pkg/vegan/R/wcmdscale.R	2013-03-09 11:26:19 UTC (rev 2476)
@@ -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: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2013-03-08 09:15:18 UTC (rev 2475)
+++ pkg/vegan/inst/ChangeLog	2013-03-09 11:26:19 UTC (rev 2476)
@@ -36,6 +36,11 @@
 	* text.cca, points.cca: gained argument 'axis.bp' (defaults TRUE)
 	to suppress drawing axes for scaled biplot arrows. Only effective
 	if 'bp' scores were requested.
+
+	* wcmdscale: setting only weights 'w' does not force full
+	"wcmdscale" output but returns only the matrix of coordinates of
+	real axes. Similarly, setting 'add = TRUE' would not force
+	"wcmdscale", but 'add' is not implemented.
 	
 Version 2.1-26 (opened February 11, 2013)
 

Modified: pkg/vegan/man/wcmdscale.Rd
===================================================================
--- pkg/vegan/man/wcmdscale.Rd	2013-03-08 09:15:18 UTC (rev 2475)
+++ pkg/vegan/man/wcmdscale.Rd	2013-03-09 11:26:19 UTC (rev 2476)
@@ -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