ordi_identify | R Documentation |
Interactive identify ggvegan species
ordi_identify(plotname, size = 3, ...)
plotname |
Name of a plot created with |
size |
Font size of labels (default = 3) |
... |
Other optional parameters |
This function is designed to be run interactively. First create a standard
ordination using ordi_pca
, ordi_rda
,
ordi_ca
, ordi_cca
or ordi_nmds
.
Then call ordi_plot
but make sure that the plot results is
stored in an R object. Then apply this function to that object, and hit the
Esc key to exit function.
Note: In RStudio only the most recently displayed plot can be
labelled with this function, so avoid using the back arrow keys in the RStudio
plot window. Labelling may not always occur on first click, and is more
difficult on constrained ordination plots.
The original ordiname is modified with labels
Roy Sanderson, School of Natural & Environmental Science, Newcastle University roy.sanderson@newcastle.ac.uk
if(interactive()){ # Unconstrained ordination data(dune) data(dune.env) dune_pca <- ordi_pca(dune) dune_plt <- ordi_plot(dune_pca, layers="species", geom="point") # defaults to sites and species dune_plt # Display the plot ordi_identify(dune_plt) # Hit Esc key to exit # Constrained ordination dune_rda <- ordi_rda(dune ~ A1 + Management, data=dune.env) # displays spp and constraints. # Constraints are "biplot" for continuous and "centroids" for categorical dune_plt <- ordi_plot(dune_rda, layers=c("species", "biplot", "centroids"), geom="point") dune_plt # Display the plot ordi_identify(dune_plt) # Hit Esc key to exit }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.