View source: R/visualization.R
| PCplot | R Documentation |
Performs PCA on the community composition matrix (ocmat) and plots the first
two PCs. Points are colored by the stable state (basin) label estimated
from Bi. If pruned = TRUE, colors correspond to the
pruned/merged basin labels in ssrep (stablestates2), otherwise to the
original labels (stablestates). When export = TRUE, the plotting data
frame (stable-state labels + PCs + merged labels) is returned.
PCplot(ocmat, sa = sa, env = NULL, ssrep = NULL, pruned = TRUE, export = FALSE)
ocmat |
Data frame (or matrix) of community compositions (rows = samples, columns = species/features). |
sa |
Parameter set passed to sa2params. |
env |
Optional environment object passed to sa2params. |
ssrep |
Data frame-like object providing stable state label mapping with
two columns: |
pruned |
Logical; if TRUE, use |
export |
Logical; if TRUE, return the data used for plotting. |
NULL invisibly (or a data frame when export = TRUE).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.