[Vegan-commits] r2481 - in pkg/vegan: . R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 17 11:07:33 CET 2013


Author: jarioksa
Date: 2013-03-17 11:07:32 +0100 (Sun, 17 Mar 2013)
New Revision: 2481

Modified:
   pkg/vegan/DESCRIPTION
   pkg/vegan/R/rda.default.R
   pkg/vegan/inst/ChangeLog
Log:
zero eigenvalue judged proportionally to first eeigenvalue in rda

Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION	2013-03-16 21:01:00 UTC (rev 2480)
+++ pkg/vegan/DESCRIPTION	2013-03-17 10:07:32 UTC (rev 2481)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 2.1-27
-Date: February 22, 2013
+Version: 2.1-28
+Date: March 17, 2013
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, 
    M. Henry H. Stevens, Helene Wagner  

Modified: pkg/vegan/R/rda.default.R
===================================================================
--- pkg/vegan/R/rda.default.R	2013-03-16 21:01:00 UTC (rev 2480)
+++ pkg/vegan/R/rda.default.R	2013-03-17 10:07:32 UTC (rev 2481)
@@ -1,7 +1,7 @@
 `rda.default` <-
     function (X, Y, Z, scale = FALSE, ...) 
 {
-    ZERO <- 1e-04
+    ZERO <- 1e-05
     CCA <- NULL
     pCCA <- NULL
     CA <- NULL
@@ -39,7 +39,7 @@
         Y <- qr.fitted(Q, Xbar)
         sol <- svd(Y)
         ## it can happen that rank < qrank
-        rank <- min(rank, sum(sol$d > ZERO))
+        rank <- min(rank, sum(sol$d > (sol$d[1L] * ZERO)))
         sol$d <- sol$d/sqrt(NR)
         ax.names <- paste("RDA", 1:length(sol$d), sep = "")
         colnames(sol$u) <- ax.names
@@ -93,7 +93,7 @@
     names(sol$d) <- ax.names
     rownames(sol$u) <- rownames(X)
     rownames(sol$v) <- colnames(X)
-    rank <- min(Q$rank, sum(sol$d > ZERO))
+    rank <- min(Q$rank, sum(sol$d > (sol$d[1L] * ZERO)))
     if (rank) {
         CA <- list(eig = (sol$d[1:rank]^2))
         CA$u <- as.matrix(sol$u)[, 1:rank, drop = FALSE]

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2013-03-16 21:01:00 UTC (rev 2480)
+++ pkg/vegan/inst/ChangeLog	2013-03-17 10:07:32 UTC (rev 2481)
@@ -2,8 +2,17 @@
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
-Version 2.1-27 (opened Februray 22, 2013)
+Version 2.1-28 (opened March 17, 2013)
 
+	* rda: eigenvalues are now regarded as zero if they are very small
+	compared to the first eigenvalue. Earlier we used fixed limit of
+	1e-4, but now the limit is first eigenvalues * 1e-5. Similar
+	change was not made in cca, since there the theoretical maximum of
+	the eigenvalue is 1, and comparison to an absolute minimum
+	threshold of 1e-4 makes sense.
+	
+Version 2.1-27 (closed March 17, 2013)
+
 	* cca/rda/capscale: removed references to 'u.eig' and 'v.eig'
 	items in support functions. These now use 'u' and 'v' items and
 	scale these with 'eig' (or diag(sqrt(eig))) when needed. This
@@ -13,7 +22,8 @@
 	*.eig items for years, and most vegan functions already avoided
 	using them. We have no idea if any external packages depend on
 	these and therefore we delay the removal till vegan 2.3 and 2.4
-	release. 
+	release. However, we warn about this in NEWS for 2.0-7 and also
+	say this clearly in cca.object documentation.
 
 	* nestedtemp: function failed if the matrix fill was < 0.38%,
 	because the fill line parameter was outside the original



More information about the Vegan-commits mailing list