[Vegan-commits] r1608 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 27 09:59:49 CEST 2011
Author: jarioksa
Date: 2011-05-27 09:59:48 +0200 (Fri, 27 May 2011)
New Revision: 1608
Modified:
pkg/vegan/R/capscale.R
pkg/vegan/inst/ChangeLog
Log:
make species scores NA if no 'comm' was defined in capscale
Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R 2011-05-26 13:28:31 UTC (rev 1607)
+++ pkg/vegan/R/capscale.R 2011-05-27 07:59:48 UTC (rev 1608)
@@ -128,6 +128,11 @@
sol$CA$v <- sweep(sol$CA$v.eig, 2, sqrt(sol$CA$eig[1:poseig]),
"/")
}
+ } else {
+ ## input data were dissimilarities, and no 'comm' defined:
+ ## species scores make no sense and are made NA
+ sol$CA$v.eig <- sol$CA$v <- sol$CCA$v <- sol$CCA$v.eig <- NA
+ sol$colsum <- NA
}
if (!is.null(sol$CCA))
sol$CCA$centroids <- centroids.cca(sol$CCA$wa, d$modelframe)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2011-05-26 13:28:31 UTC (rev 1607)
+++ pkg/vegan/inst/ChangeLog 2011-05-27 07:59:48 UTC (rev 1608)
@@ -4,6 +4,11 @@
Version 1.18-31 (opened May 26, 2011)
+ * capscale: species scores will be NA if input data were
+ dissimilarities and no 'comm' was given. (BTW, if input data were
+ dissimilarities, update() will fail! -- I don't know why, but
+ anybody can fix this.)
+
* oecosimu: reverted r1557 of version 1.18-26, or splitting tied
values. This was introduced because Chase et al. (Ecosphere 2011,
http://www.esajournals.org/doi/pdf/10.1890/ES10-00117.1) used this
More information about the Vegan-commits
mailing list