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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 19 18:36:34 CET 2009


Author: jarioksa
Date: 2009-02-19 18:36:34 +0100 (Thu, 19 Feb 2009)
New Revision: 689

Modified:
   pkg/vegan/R/points.procrustes.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/procrustes.Rd
Log:
added text.procrustes()

Modified: pkg/vegan/R/points.procrustes.R
===================================================================
--- pkg/vegan/R/points.procrustes.R	2009-02-17 09:08:53 UTC (rev 688)
+++ pkg/vegan/R/points.procrustes.R	2009-02-19 17:36:34 UTC (rev 689)
@@ -1,4 +1,4 @@
-"points.procrustes" <-
+`points.procrustes` <-
     function(x, display = c("target","rotated"), ...)
 {
     display <- match.arg(display)
@@ -6,3 +6,14 @@
     points(x, ...)
     invisible()
 }
+
+`text.procrustes` <-
+    function(x, display = c("target","rotated"), labels, ...)
+{
+    display <- match.arg(display)
+    x <- if (display == "target") x$X else x$Yrot
+    if (missing(labels))
+        labels <- rownames(x)
+    text(x, labels = labels, ...)
+    invisible()
+}

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-02-17 09:08:53 UTC (rev 688)
+++ pkg/vegan/inst/ChangeLog	2009-02-19 17:36:34 UTC (rev 689)
@@ -4,6 +4,8 @@
 
 Version 1.16-13 (opened Feb 15, 2009)
 
+	* text.procrustes: added text() function for procrustes() result plots.
+
 	* rad.null: failed with family = gaussian and Gamma.
 
 	* simulate.rda: new method to simulate responses with random error

Modified: pkg/vegan/man/procrustes.Rd
===================================================================
--- pkg/vegan/man/procrustes.Rd	2009-02-17 09:08:53 UTC (rev 688)
+++ pkg/vegan/man/procrustes.Rd	2009-02-19 17:36:34 UTC (rev 689)
@@ -5,6 +5,7 @@
 \alias{print.summary.procrustes}
 \alias{plot.procrustes}
 \alias{points.procrustes}
+\alias{text.procrustes}
 \alias{lines.procrustes}
 \alias{residuals.procrustes}
 \alias{fitted.procrustes}
@@ -23,6 +24,7 @@
 \method{plot}{procrustes}(x, kind=1, choices=c(1,2), xlab, ylab, main,
      ar.col = "blue", len=0.05, ...)
 \method{points}{procrustes}(x, display = c("target", "rotated"), ...)
+\method{text}{procrustes}(x, display = c("target", "rotated"), labels, ...)
 \method{lines}{procrustes}(x, type = c("segments", "arrows"), choices = c(1, 2), ...)  
 \method{residuals}{procrustes}(object, ...)
 \method{fitted}{procrustes}(object, truemean = TRUE, ...)
@@ -61,6 +63,8 @@
     specified strata.}
   \item{ar.col}{Arrow colour.}
   \item{len}{Width of the arrow head.}
+  \item{labels}{Character vector of text labels. Rownames of the result 
+    object are used as default.}
   \item{...}{Other parameters passed to functions. In \code{procrustes}
     and \code{protest} parameters are passed to \code{\link{scores}}, in
     graphical functions to underlying graphical functions.}



More information about the Vegan-commits mailing list