ps_rgb | R Documentation |
Perform an ordination that reduces a spatial phylogenetic data set into three dimensions that can be
plotted as the RGB bands of color space to visualize spatial patterns of community phylogenetic composition.
This function is a wrapper around ps_ordinate()
.
ps_rgb(ps, method = c("nmds", "cmds", "pca"), trans = identity, spatial = TRUE)
ps |
A |
method |
Ordination method, either "pca" (principal component analysis implemented via |
trans |
A function giving a transformation to apply to each dimension of the ordinated data.
The default is the identity function. Specifying |
spatial |
Logical indicating whether a spatial object (inherited from |
A matrix or spatial object with three variables containing RGB color values in the range 0-1.
ps <- ps_add_dissim(moss())
RGB <- ps_rgb(ps, method = "cmds")
terra::plotRGB(RGB * 255, smooth = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.