[Vegan-commits] r2174 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 22 17:33:34 CEST 2012


Author: jarioksa
Date: 2012-05-22 17:33:34 +0200 (Tue, 22 May 2012)
New Revision: 2174

Modified:
   pkg/vegan/R/ordihull.R
   pkg/vegan/inst/ChangeLog
Log:
ordihull centres labels more correctly

Modified: pkg/vegan/R/ordihull.R
===================================================================
--- pkg/vegan/R/ordihull.R	2012-05-22 13:58:52 UTC (rev 2173)
+++ pkg/vegan/R/ordihull.R	2012-05-22 15:33:34 UTC (rev 2174)
@@ -29,7 +29,7 @@
             else if (draw == "polygon")
                 ordiArgAbsorber(X[hpts,], FUN = polygon, col = col, ...)
             if (label && draw != "none") {
-                cntrs <- rbind(cntrs, colMeans(X[hpts,]))
+                cntrs <- rbind(cntrs, colMeans(X[hpts[-1],, drop = FALSE]))
                 names <- c(names, is)
             }
             res[[is]] <- X[hpts,]

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-05-22 13:58:52 UTC (rev 2173)
+++ pkg/vegan/inst/ChangeLog	2012-05-22 15:33:34 UTC (rev 2174)
@@ -7,7 +7,8 @@
 	* ordihull: gained explicit 'col' argument and adds labels after
 	drawing convex hulls so that filled hulls (with 'draw = "polygon")
 	do not cover labels. With these changes, the behaviour of
-	ordihull() is similar to ordiellipse().
+	ordihull() is similar to ordiellipse(). The labels are centred
+	more correctly.
 
 	* monoMDS: Count only above-zero non-NA dissimilarities for the
 	absolute lower limit of sufficient data. 



More information about the Vegan-commits mailing list