[Vegan-commits] r883 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 29 08:04:44 CEST 2009


Author: jarioksa
Date: 2009-06-29 08:04:44 +0200 (Mon, 29 Jun 2009)
New Revision: 883

Modified:
   pkg/vegan/R/orditorp.R
Log:
orditorp works with reversed axes

Modified: pkg/vegan/R/orditorp.R
===================================================================
--- pkg/vegan/R/orditorp.R	2009-06-28 15:16:08 UTC (rev 882)
+++ pkg/vegan/R/orditorp.R	2009-06-29 06:04:44 UTC (rev 883)
@@ -12,8 +12,8 @@
         labels <- rownames(x)
     if (missing(priority))
         priority <- rowSums((scale(x)^2))
-    w <- strwidth(labels, cex = cex)/2 * air
-    h <- strheight(labels, cex = cex)/2 * air
+    w <- abs(strwidth(labels, cex = cex))/2 * air
+    h <- abs(strheight(labels, cex = cex))/2 * air
     xx <- cbind(x[, 1] - w, x[, 1] + w, x[, 2] - h, x[, 2] +
                 h)
     is.na(priority) <- w == 0



More information about the Vegan-commits mailing list