[R-sig-eco] ordihull does not overlay hulls correctly
Jari Oksanen
jari.oksanen at oulu.fi
Wed Sep 15 16:11:25 CEST 2010
On Wed, 2010-09-15 at 15:55 +0200,
cristabel.duran at waldbau.uni-freiburg.de wrote:
> Dear r-ecology members,
>
> I am performing a NMDS ordination and I want to add hulls
> with ordihull, to see which sites (vegetation plots)
> belongs to a factor
> of my environmental variable. For that I used:
>
> plot(metaf, display="sites", choices = c(1,2))
> ordihull(metaf, env$clus, lty = 2, col = "blue",
> label=TRUE)
> # metaf is my ordination object.
> # env$clus is the factor
>
> The hulls vertices coincides with plots.
> BUT... when plotting metaf chossing axis c(1,3) or c(2,3),
> the vertices do not fit with the plots.
> The ordination space is plotted with sites but with the
> hulls corresponding to the ordination plot with axis 1 and
> 2.
Dear Cristabel,
Did you tell ordihull() about your choices? That is:
plot(metaf, display="sites", choices = c(1,3))
ordihull(metaf, env$clus, lty = 2, col = "blue", label=TRUE,
choices=c(1,3))
To avoid superfluous warnings, you can alternatively do:
pl <- plot(metaf, display="sites", choices = c(1,3))
ordihull(pl, env$clus, lty = 2, col = "blue", label=TRUE)
Vegan ordination plot functions normally return invisibly an object of
class "ordiplot" with plotted scores, and you can use this in subsequent
comments where you add new items to plots. The invisible ordination
object is practical when you have non-standard options in plots, like
choices or scaling, and want to be sure that the same settings will be
used subsequently.
The "invisible" object means that it is not printed, but once you catch
and save the object, it is visible and usable. More details
in ?invisible.
Cheers, Jari Oksanen
More information about the R-sig-ecology
mailing list