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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Oct 16 07:10:41 CEST 2010


Author: jarioksa
Date: 2010-10-16 07:10:41 +0200 (Sat, 16 Oct 2010)
New Revision: 1334

Modified:
   pkg/vegan/R/wcmdscale.R
   pkg/vegan/man/wcmdscale.Rd
Log:
reverse order of GOF statistics to match cmdscale()

Modified: pkg/vegan/R/wcmdscale.R
===================================================================
--- pkg/vegan/R/wcmdscale.R	2010-10-15 17:27:31 UTC (rev 1333)
+++ pkg/vegan/R/wcmdscale.R	2010-10-16 05:10:41 UTC (rev 1334)
@@ -45,8 +45,8 @@
     ev <- e$values[1:k]
     ev <- ev[ev > 0]
     ## GOF for real and all axes
-    GOF <- c(sum(ev)/sum(e$values[e$values > 0]),
-             sum(ev)/sum(abs(e$values)))
+    GOF <- c(sum(ev)/sum(abs(e$values)),
+             sum(ev)/sum(e$values[e$values > 0]))
     if (eig || x.ret || add) {
         out <- list(points = points, eig = if (eig) e$values,
                     x = if (x.ret) m, ac = NA, GOF = GOF, weights = w,

Modified: pkg/vegan/man/wcmdscale.Rd
===================================================================
--- pkg/vegan/man/wcmdscale.Rd	2010-10-15 17:27:31 UTC (rev 1333)
+++ pkg/vegan/man/wcmdscale.Rd	2010-10-16 05:10:41 UTC (rev 1334)
@@ -38,9 +38,9 @@
 
 \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
-  following components.
+  points chosen to represent the dissimilarities.  Otherwise, an
+  object of class \code{wcmdscale} containing the components that are
+  similar as in \code{\link{cmdscale}} (except \samp{weights}):
   \item{points}{a matrix with \code{k} columns whose rows give the
     coordinates of the points chosen to represent the
     dissimilarities.}
@@ -49,8 +49,8 @@
   \item{x}{the doubly centred and weighted distance matrix if
   \code{x.ret} is true.}
   \item{GOF}{Goodness of fit statistics for \code{k} axes. The first
-    value is for all real axes, and the second value for all axes,
-    including absolute values of negative eigenvalues.}
+    value is based on the sum of absolute values of all eigenvalues,
+    and the second value is based on the sum of positive eigenvalues}
   \item{weights}{Weights.}
   \item{negaxes}{A matrix of scores for axes with negative eigenvalues
      scaled by the absolute eigenvalues similarly as



More information about the Vegan-commits mailing list