| lets.plot.attrpam | R Documentation |
Plots the richness (or a single species) in the attribute (trait) space
generated by lets.attrpam.
lets.plot.attrpam(x, species = NULL, cell_id = NULL, col_rich = NULL, ...)
x |
A list returned by |
species |
Optional. A character string with the name of a species to highlight. If provided, plots its presence in trait space. |
cell_id |
An integer or vector of integers indicating attribute space cell(s) to be highlighted. |
col_rich |
Optional. A color palette function or vector. If 'NULL', a default palette is used (red ramp for species maps, red–white ramp for richness). |
... |
Additional arguments passed to |
Plot an Attribute-space PAM
## Not run:
# Example with simulated traits
n <- 2000
Species <- paste0("sp", 1:n)
trait_a <- rnorm(n)
trait_b <- trait_a * 0.2 + rnorm(n) # correlated trait
df <- data.frame(Species, trait_a, trait_b)
# Build AttrPAM
x <- lets.attrpam(df, n_bins = 30)
lets.plot.attrpam(x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.