[Vegan-commits] r1200 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri May 28 14:07:15 CEST 2010
Author: jarioksa
Date: 2010-05-28 14:07:15 +0200 (Fri, 28 May 2010)
New Revision: 1200
Modified:
pkg/vegan/R/cca.formula.R
pkg/vegan/R/rda.formula.R
pkg/vegan/inst/ChangeLog
Log:
plot(cca(dune ~ A1 + Condition(Management), dune.env)) failed
Modified: pkg/vegan/R/cca.formula.R
===================================================================
--- pkg/vegan/R/cca.formula.R 2010-05-27 15:54:54 UTC (rev 1199)
+++ pkg/vegan/R/cca.formula.R 2010-05-28 12:07:15 UTC (rev 1200)
@@ -14,10 +14,13 @@
sol$rowsum)
if (!is.null(sol$CCA$alias))
sol$CCA$centroids <- unique(sol$CCA$centroids)
+ ## See that there really are centroids
if (!is.null(sol$CCA$centroids)) {
rs <- rowSums(sol$CCA$centroids^2)
sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
drop = FALSE]
+ if (length(sol$CCA$centroids) == 0)
+ sol$CCA$centroids <- NULL
}
sol$terms <- d$terms
sol$terminfo <- ordiTerminfo(d, d$modelframe)
Modified: pkg/vegan/R/rda.formula.R
===================================================================
--- pkg/vegan/R/rda.formula.R 2010-05-27 15:54:54 UTC (rev 1199)
+++ pkg/vegan/R/rda.formula.R 2010-05-28 12:07:15 UTC (rev 1200)
@@ -18,6 +18,8 @@
rs <- rowSums(sol$CCA$centroids^2)
sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
drop = FALSE]
+ if (length(sol$CCA$centroids) == 0)
+ sol$CCA$centroids <- NULL
}
sol$terms <- d$terms
sol$terminfo <- ordiTerminfo(d, d$modelframe)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-05-27 15:54:54 UTC (rev 1199)
+++ pkg/vegan/inst/ChangeLog 2010-05-28 12:07:15 UTC (rev 1200)
@@ -4,6 +4,12 @@
Version 1.18-5 (opened May 21, 2010)
+ * cca, rda: plot() failed if Condition() had factors, but
+ constraints had no factors. An example of failure:
+
+ m <- cca(dune ~ A1 + Condition(Management), dune.env)
+ plot(m) ## failed
+
* ordispider: gained 'label' argument (uses ordilabel()). Can now
handle ordihull() result objects: connects points in the line to
the hull centroid. Extended examples.
More information about the Vegan-commits
mailing list