[Vegan-commits] r2837 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 21 12:53:12 CET 2014
Author: jarioksa
Date: 2014-01-21 12:53:11 +0100 (Tue, 21 Jan 2014)
New Revision: 2837
Modified:
pkg/vegan/R/biplot.rda.R
pkg/vegan/inst/ChangeLog
Log:
rda biplot failed with NA scores (like with negative 'scaling' and zero variance species)
Modified: pkg/vegan/R/biplot.rda.R
===================================================================
--- pkg/vegan/R/biplot.rda.R 2014-01-14 12:13:28 UTC (rev 2836)
+++ pkg/vegan/R/biplot.rda.R 2014-01-21 11:53:11 UTC (rev 2837)
@@ -31,9 +31,9 @@
if(length(type) < 2)
type <- rep(type, 2)
if (missing(xlim))
- xlim <- range(g$species[, 1], g$sites[, 1])
+ xlim <- range(g$species[, 1], g$sites[, 1], na.rm = TRUE)
if (missing(ylim))
- ylim <- range(g$species[, 2], g$sites[, 2])
+ ylim <- range(g$species[, 2], g$sites[, 2], na.rm = TRUE)
plot(g[[1]], xlim = xlim, ylim = ylim, type = "n", asp = 1,
...)
abline(h = 0, lty = 3)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2014-01-14 12:13:28 UTC (rev 2836)
+++ pkg/vegan/inst/ChangeLog 2014-01-21 11:53:11 UTC (rev 2837)
@@ -11,11 +11,14 @@
be used in an incorrect context". The dots were added in r2765,
and now removed.
+ * biplot.rda: failed in axis scaling with negative 'scaling'
+ values when some species had zero variance (and hence species
+ scores was 0/0 = NaN).
+
* cascadeKM: Calinski index for one group will now be NA instead
of randomly chosen Inf, -Inf or NaN which can cause confusion (see
http://stackoverflow.com/questions/21022848/r-produces-different-result-after-io-on-file
-
* ordiellipse: failed if all points were on a line. Now handles
these cases by drawing a line trhough the points, and issuing a
warning from chol(): "the matrix is either rank-deficient or
More information about the Vegan-commits
mailing list