| ps_get_comm | R Documentation |
phylospatial community dataGet phylospatial community data
ps_get_comm(ps, tips_only = TRUE, spatial = TRUE)
ps |
|
tips_only |
Logical indicating whether only the terminal taxa (TRUE, the default) or all taxa (FALSE) should be returned. |
spatial |
Logical indicating whether a spatial ( |
If spatial = TRUE, a SpatRaster or sf object with a
layer/column for every taxon, with NA for unoccupied sites. If
spatial = FALSE, a matrix containing only occupied sites (i.e.,
with nrow equal to the number of occupied sites, not the total
number of grid cells). Use ps_expand() to expand an occupied-only
matrix back to the full spatial extent if needed.
ps <- ps_simulate()
# the defaults return a spatial object of terminal taxa distributions:
ps_get_comm(ps)
# get distributions for all taxa, as a matrix
pcomm <- ps_get_comm(ps, tips_only = FALSE, spatial = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.