[Vegan-commits] r1451 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 10 17:00:38 CET 2011
Author: jarioksa
Date: 2011-01-10 17:00:38 +0100 (Mon, 10 Jan 2011)
New Revision: 1451
Modified:
pkg/vegan/R/predict.rda.R
pkg/vegan/inst/ChangeLog
Log:
predicty type = 'working' for capscale returns now scaled scores like was documented
Modified: pkg/vegan/R/predict.rda.R
===================================================================
--- pkg/vegan/R/predict.rda.R 2011-01-10 15:34:11 UTC (rev 1450)
+++ pkg/vegan/R/predict.rda.R 2011-01-10 16:00:38 UTC (rev 1451)
@@ -31,9 +31,12 @@
}
if (inherits(object, "capscale")) {
if (take > 0) {
- out <- dist(u %*% slam/sqrt(nr))
- if (!is.null(object$ac))
- out <- out - object$ac
+ out <- u %*% slam/sqrt(nr)
+ if (type == "response") {
+ out <- dist(out)
+ if (!is.null(object$ac))
+ out <- out - object$ac
+ }
}
} else {
if (take > 0)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2011-01-10 15:34:11 UTC (rev 1450)
+++ pkg/vegan/inst/ChangeLog 2011-01-10 16:00:38 UTC (rev 1451)
@@ -10,6 +10,10 @@
subtracted from the estimated distances when 'add = TRUE' was used
in capscale().
+ * predict.rda: type = "working" for capscale returns now scaled
+ scores that produce the dissimilarities as Euclidean distances --
+ like was claimed in the help page.
+
Version 1.18-20 (closed January 9, 2011)
* base of vegan release 1.17-6 (released on Jan 10, 2011).
More information about the Vegan-commits
mailing list