Description Usage Arguments Details Examples
View source: R/posterior_analyses.R
Plot a pair of principal coordinates
1 2 3 4 5 6 7 8 9 10 |
coordinates |
data.frame of coordinates from posterior embedding |
centroids |
data.frame of centroids from posterior embedding |
tax_level |
taxonomic level at which to agglomerate data |
axis1 |
PCoA coordinate to display on x-axis |
axis2 |
PCoA coordinate to display on y-axis |
annotation |
label to assign (e.g. individual) |
MAP |
use MAP estimate model output instead of full posterior output |
show_plot |
show() plot in addition to rendering it to a file |
Coordinates parameter is only necessary where we're plotting full host posteriors (i.e. where annotation="host").
1 2 3 4 5 6 | tax_level <- "genus"
annotation <- "group"
MAP <- FALSE
centroids <- readRDS(file.path("output","plots",tax_level,"Sigma_ordination_centroids.rds"))
labelled_centroids <- get_other_labels(centroids=centroids, tax_level=tax_level, annotation=annotation, MAP=MAP)
plot_axes(coordinates=labelled_centroids, tax_level=tax_level, axis1=1, axis2=2, annotation=annotation, MAP=MAP)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.