0

I've run an redundancy analysis on fish assemblage data using the rda() function from the vegan package in R. I'd like to only add species to the plot which had >10% of variance explained by the analysis.

I have found a reference to doing that here on slide 11, but I haven't been able find code anywhere to be able to plot a subset like that. Thanks for the help.

wstiles
  • 1
  • 2
  • You should post some data... – admccurdy Mar 02 '16 at 02:35
  • Give a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5965451#5965451) so others can paste your code in their R session. – Paul Rougieux Mar 02 '16 at 09:34
  • The `points` and `text` commands for `rda` in **vegan** have a `select` argument that can be used like the name indicates: select a subset for which a condition is true. Then there are commands like `goodness` that can return -- like the name indicates -- goodness-of-fit statistics. Combining these two can get you something like `plot(uh, type="n", dis="sp")` followed with `text(uh, dis="sp", select=goodness(uh, prop=T, summarize=T) > 0.2)`. – Jari Oksanen Mar 02 '16 at 12:56
  • The link that @PaulRougieux posted has some great suggestions on how to do this typically posting the results of `dput()` is a pretty good method. If you're working with a large dataset you should try and post a subset of data which is enough to illustrate your problem. – admccurdy Mar 03 '16 at 16:29
  • @JariOksanen: Thanks a lot. That worked well. – wstiles Mar 04 '16 at 00:15
  • @AdamMccurdy, Thank you for your helping me improve my question. I'll add the code and data to improve the question for others when I get a chance. – wstiles Mar 04 '16 at 00:20
  • @PaulRougieux, Thanks to you too for that very useful link – wstiles Mar 04 '16 at 00:20
  • 2
    No problem when you add some data and code you should probably add the solution you came up with based on Jari's suggestion as an answer and accept it to close out the question. – admccurdy Mar 04 '16 at 00:49

0 Answers0