[Vegan-commits] r1960 - in branches/2.0: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Oct 20 16:06:51 CEST 2011
Author: jarioksa
Date: 2011-10-20 16:06:51 +0200 (Thu, 20 Oct 2011)
New Revision: 1960
Modified:
branches/2.0/R/capscale.R
branches/2.0/inst/ChangeLog
branches/2.0/inst/NEWS.Rd
Log:
merge r1959 (capscale zero rank fix) + mark-up in NEWS
Modified: branches/2.0/R/capscale.R
===================================================================
--- branches/2.0/R/capscale.R 2011-10-20 09:55:57 UTC (rev 1959)
+++ branches/2.0/R/capscale.R 2011-10-20 14:06:51 UTC (rev 1960)
@@ -91,7 +91,7 @@
if (adjust == 1)
X$eig <- X$eig/k
sol <- rda.default(X$points, d$Y, d$Z, ...)
- if (!is.null(sol$CCA)) {
+ if (!is.null(sol$CCA) && sol$CCA$rank > 0) {
colnames(sol$CCA$u) <- colnames(sol$CCA$biplot) <- names(sol$CCA$eig) <-
colnames(sol$CCA$wa) <- colnames(sol$CCA$v) <-
paste("CAP", 1:ncol(sol$CCA$u), sep = "")
@@ -118,9 +118,9 @@
## NA action after 'subset'
if (!is.null(d$na.action))
comm <- comm[-d$na.action, , drop = FALSE]
- if (!is.null(sol$pCCA))
+ if (!is.null(sol$pCCA) && sol$pCCA$rank > 0)
comm <- qr.resid(sol$pCCA$QR, comm)
- if (!is.null(sol$CCA)) {
+ if (!is.null(sol$CCA) && sol$CCA$rank > 0) {
sol$CCA$v.eig <- t(comm) %*% sol$CCA$u/sqrt(k)
sol$CCA$v <- sweep(sol$CCA$v.eig, 2, sqrt(sol$CCA$eig),
"/")
@@ -139,7 +139,7 @@
sol$CCA$v.eig[] <- sol$CCA$v[] <- NA
sol$colsum <- NA
}
- if (!is.null(sol$CCA))
+ if (!is.null(sol$CCA) && sol$CCA$rank > 0)
sol$CCA$centroids <- centroids.cca(sol$CCA$wa, d$modelframe)
if (!is.null(sol$CCA$alias))
sol$CCA$centroids <- unique(sol$CCA$centroids)
Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog 2011-10-20 09:55:57 UTC (rev 1959)
+++ branches/2.0/inst/ChangeLog 2011-10-20 14:06:51 UTC (rev 1960)
@@ -4,6 +4,8 @@
Version 2.0-2 (opened October 20, 2011)
+ * merge r1959: capscale zero-rank constraints bug fix.
+
Version 2.0-1 (released October 20, 2011)
* merge r1945: add plot & lines for as.preston & as.fisher.
Modified: branches/2.0/inst/NEWS.Rd
===================================================================
--- branches/2.0/inst/NEWS.Rd 2011-10-20 09:55:57 UTC (rev 1959)
+++ branches/2.0/inst/NEWS.Rd 2011-10-20 14:06:51 UTC (rev 1960)
@@ -2,6 +2,24 @@
\title{vegan News}
\encoding{UTF-8}
+\section{Changes in version 2.0-2}{
+ \subsection{BUG FIXES}{
+
+ \itemize{
+
+ \item Function \code{capscale} failed if constrained component
+ had zero rank. This is most likely in partial models where the
+ conditions can alias constraints. This was manifest in
+ \code{anova(..., by ="margin")} which uses partial models to
+ analyses the marginal effects, and was raported in an email
+ message to
+ \href{https://stat.ethz.ch/pipermail/r-help/2011-October/293077.html}{R-News
+ mailing list}.
+
+ }
+ } % end bug fixes
+} %end version 2.0-2
+
\section{Changes in version 2.0-1}{
\subsection{NEW FUNCTIONS}{
\itemize{
@@ -27,8 +45,8 @@
species and analytic equations. The new \code{raupcrick}
function uses simulation with \code{oecosimu}. The function
follows Chase et al. (2011) \emph{Ecosphere} 2:art24
- [doi:10.1890/ES10-00117.1], and was developed with the
- consultation of Brian Inouye.
+ [\href{http://www.esajournals.org/doi/abs/10.1890/ES10-00117.1}{doi:10.1890/ES10-00117.1}],
+ and was developed with the consultation of Brian Inouye.
}
} % end NEW FUNCTIONS
More information about the Vegan-commits
mailing list