[R] "Ordiellipse" in vegan package plot; how to plot sd for individual species
David L Carlson
dcarlson at tamu.edu
Thu Mar 23 17:47:50 CET 2017
Most attachments (including your data and graph) get stripped from mail sent to the list. If the data are a plain text file, giving the file an extension of .txt will usually let it survive the trip (even if it is a .csv file). Graphics will survive if they are .png files.
If the datasets are not large, use dput(env) and dput(species), and then paste the output of those commands into your email message.
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Larsson Emil
Sent: Thursday, March 23, 2017 7:44 AM
To: r-help at r-project.org
Subject: [R] "Ordiellipse" in vegan package plot; how to plot sd for individual species
I have been looking for an answer to this question for some time without success, so now my hope is that you will distribute it to your email subscribers, or direct me to another forum where this question is not off-topic.
I have a dataset with 224 rows (=sites), ca 20 environmental variables, and presence/absence data for ca 40 species. TI have done an RDA ordination using the vegan package and plotted all species. Now, I want to add standard deviation for each species as circles or ellipses.
How can I do this? I tried using "ordiellipse", guided by this similar request from 2010 answered by Jari Oksanen:
I am close but I cannot make it work. I have attached the dataset (V=variables, S= species) and an example sketch of how the final plot should look.
Here is my script so far:
# add environmental and species data separately:
# run RDA command and plot:
plot(mod, display = "species")
ordiellipse(mod, groups = rep(1, 224), display="lc", kind ="sd", draw = "polygon",
alpha = 127, label = FALSE, show.groups=TRUE, w = NULL, border = NULL, lty = NULL, lwd=NULL)
Very grateful for any help.
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help