[Vegan-commits] r1590 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Apr 25 12:56:26 CEST 2011
Author: jarioksa
Date: 2011-04-25 12:56:25 +0200 (Mon, 25 Apr 2011)
New Revision: 1590
Modified:
pkg/vegan/R/capscale.R
pkg/vegan/inst/ChangeLog
Log:
don't fix a fixed thing in R 2.13.0 or capscale may fail when add = TRUE
Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R 2011-04-11 18:54:47 UTC (rev 1589)
+++ pkg/vegan/R/capscale.R 2011-04-25 10:56:25 UTC (rev 1590)
@@ -76,7 +76,8 @@
if (add) {
X <- cmdscale(X, k = k, eig = TRUE, add = add)
## All eigenvalues *should* be positive, but see that they are
- X$points <- X$points[, X$eig[-(k+1)] > 0]
+ if (getRversion() < "2.13.0")
+ X$points <- X$points[, X$eig[-(k+1)] > 0]
X$eig <- X$eig[X$eig > 0]
}
else
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2011-04-11 18:54:47 UTC (rev 1589)
+++ pkg/vegan/inst/ChangeLog 2011-04-25 10:56:25 UTC (rev 1590)
@@ -4,6 +4,12 @@
Version 1.18-29 (opened April 11, 2011)
+ * capscale: could fail with add = TRUE in R 2.13.0. A kluge was
+ necessary in cmdscale() pre 2.13.0, but the feature was fixed in R
+ 2.13.0 and unnecessary fix failed. Now the kluge is used only in
+ older versions of R and capscale should be working both in 2.13.0
+ and older R.
+
* adipart.Rd, multipart.Rd: cancelled some excessive speed-ups in
example code made in r1204. Some of these speed-ups never made to
the release version, but were only made in the devel branch. The
More information about the Vegan-commits
mailing list