[Vegan-commits] r1201 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat May 29 08:09:36 CEST 2010
Author: jarioksa
Date: 2010-05-29 08:09:34 +0200 (Sat, 29 May 2010)
New Revision: 1201
Modified:
pkg/vegan/R/ordiarrows.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/ordihull.Rd
Log:
ordiarrows gained 'label'
Modified: pkg/vegan/R/ordiarrows.R
===================================================================
--- pkg/vegan/R/ordiarrows.R 2010-05-28 12:07:15 UTC (rev 1200)
+++ pkg/vegan/R/ordiarrows.R 2010-05-29 06:09:34 UTC (rev 1201)
@@ -1,6 +1,6 @@
"ordiarrows" <-
function (ord, groups, levels, replicates, display = "sites",
- show.groups, startmark, ...)
+ show.groups, startmark, label = FALSE, ...)
{
pts <- scores(ord, display = display, ...)
npoints <- nrow(pts)
@@ -13,6 +13,7 @@
}
out <- seq(along = groups)
inds <- names(table(groups))
+ starts <- names <- NULL
for (is in inds) {
gr <- out[groups == is]
if (length(gr) > 1) {
@@ -22,6 +23,10 @@
nseg <- nrow(X0)
if (!missing(startmark))
points(X0[1,1], X0[1,2], pch=startmark, ...)
+ if (label) {
+ starts <- rbind(starts, X0[1,])
+ names <- c(names, is)
+ }
if (nseg > 1)
ordiArgAbsorber(X0[-nseg,1], X0[-nseg,2], X1[-nseg,1],
X1[-nseg,2], FUN = segments, ...)
@@ -29,5 +34,7 @@
FUN = arrows, ...)
}
}
+ if (label)
+ ordiArgAbsorber(starts, label = names, FUN = ordilabel, ...)
invisible()
}
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-05-28 12:07:15 UTC (rev 1200)
+++ pkg/vegan/inst/ChangeLog 2010-05-29 06:09:34 UTC (rev 1201)
@@ -10,6 +10,9 @@
m <- cca(dune ~ A1 + Condition(Management), dune.env)
plot(m) ## failed
+ * ordiarrows: gained 'label' argument which uses ordilabel() on
+ arrow starts.
+
* ordispider: gained 'label' argument (uses ordilabel()). Can now
handle ordihull() result objects: connects points in the line to
the hull centroid. Extended examples.
Modified: pkg/vegan/man/ordihull.Rd
===================================================================
--- pkg/vegan/man/ordihull.Rd 2010-05-28 12:07:15 UTC (rev 1200)
+++ pkg/vegan/man/ordihull.Rd 2010-05-29 06:09:34 UTC (rev 1201)
@@ -31,7 +31,7 @@
ordispider(ord, groups, display="sites", w = weights(ord, display),
show.groups, label = FALSE, ...)
ordiarrows(ord, groups, levels, replicates, display = "sites",
- show.groups, startmark, ...)
+ show.groups, startmark, label = FALSE, ...)
ordisegments(ord, groups, levels, replicates, display = "sites",
show.groups, ...)
ordigrid(ord, levels, replicates, display = "sites", ...)
More information about the Vegan-commits
mailing list