[Vegan-commits] r2325 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Oct 14 08:57:34 CEST 2012
Author: jarioksa
Date: 2012-10-14 08:57:34 +0200 (Sun, 14 Oct 2012)
New Revision: 2325
Modified:
pkg/vegan/R/plot.procrustes.R
pkg/vegan/inst/ChangeLog
Log:
plot.procrustes draw original axes in a wrong angle in 1/2 of cases
Modified: pkg/vegan/R/plot.procrustes.R
===================================================================
--- pkg/vegan/R/plot.procrustes.R 2012-10-12 08:00:17 UTC (rev 2324)
+++ pkg/vegan/R/plot.procrustes.R 2012-10-14 06:57:34 UTC (rev 2325)
@@ -32,8 +32,9 @@
b <- abs(x$rotation[1,1])
EPS <- 1e-8
if (1 - b > EPS && b > EPS) {
- abline(0, tan(acos(x$rotation[1, 1])), lty = 1)
- abline(0, 1/tan(acos(-x$rotation[1, 1])), lty = 1)
+ rot <- x$rotation
+ abline(0, rot[1,2]/rot[1,1], lty = 1)
+ abline(0, rot[2,2]/rot[2,1], lty = 1)
} else {
abline(v = 0, h = 0)
}
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2012-10-12 08:00:17 UTC (rev 2324)
+++ pkg/vegan/inst/ChangeLog 2012-10-14 06:57:34 UTC (rev 2325)
@@ -14,6 +14,9 @@
* clamtest: output was wrong when some of the possible
species groups were missing (bug report submitted by R Telford).
+ * procrustes: plot() of two-dimensional solutions often draw
+ original axes in a wrong angle. The problem was reported by
+ Elizabeth Ottesen (MIT).
Version 2.1-20 (closed October 8, 2012)
More information about the Vegan-commits
mailing list