Re: [R] "Ordiellipse" in vegan package plot; how to plot sd for individual species
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 University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Larsson Emil Sent: Thursday, March 23, 2017 7:44 AM To: r-help@r-project.org Subject: [R] "Ordiellipse" in vegan package plot; how to plot sd for individual species Hi R-Help, 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: http://r-sig-ecology.471788.n2.nabble.com/Fwd-R-cca-standard-error-species-td4997341.html 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: env<-read.delim("clipboard") attach(env) str(env) species<-read.delim("clipboard") attach(species)? str(species) # run RDA command and plot: mod<-rda(species,env,scale=TRUE) 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. Best regards, Emil Larsson __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] "Ordiellipse" in vegan package plot; how to plot sd for individual species
Hi R-Help, 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: http://r-sig-ecology.471788.n2.nabble.com/Fwd-R-cca-standard-error-species-td4997341.html 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: env<-read.delim("clipboard") attach(env) str(env) species<-read.delim("clipboard") attach(species)? str(species) # run RDA command and plot: mod<-rda(species,env,scale=TRUE) 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. Best regards, Emil Larsson __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] ordiellipse
On May 26, 2011 Andrew Halford wrote: I am using ordiellipse to plot the ellipses and it works fine except one of my groups contains only 2 sites and I cannot get an ellipse around them. I'm assuming that 2 points is not enough to perform the relevant calculations here, however I would like to plot one if I could, if only for the sake of pictorial consistency. Ouch! for the rod that is likely to come. Advice? Collect more data, for the sake of pictorial consistency. And if you can't then you can't. What you have are the (available) facts. Regards, Mark. - Mark Difford (Ph.D.) Research Associate Botany Department Nelson Mandela Metropolitan University Port Elizabeth, South Africa -- View this message in context: http://r.789695.n4.nabble.com/ordiellipse-tp3551694p3551760.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] ordiellipse
Hi Users, I am trying to plot 95% confidence ellipses around the 4 groupings found in a PCA ordination and identified a-priori by clustering. I am using ordiellipse to plot the ellipses and it works fine except one of my groups contains only 2 sites and I cannot get an ellipse around them. I'm assuming that 2 points is not enough to perform the relevant calculations here, however I would like to plot one if I could, if only for the sake of pictorial consistency. Andy -- Andrew Halford Ph.D Associate Research Scientist Marine Laboratory University of Guam Ph: +1 671 734 2948 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.