Creates an animated plot of MPQ distances against some other measure of distance between sites
plot_all_pairs.Rd
Creates an animated plot of MPQ distances against some other measure of distance between sites
Arguments
- physeq
A phyloseq object containing species abundances, a phylogenetic tree, and sample data.
- sample_distances
Either a distance object or a (n_samples x n_samples) matrix containing distances between the samples.
- return_ggplot
If TRUE, the function will return a ggplot object which can be made into an animated plot by calling ggplotly on it. If FALSE, the function will create the animated plot. The option of returning the ggplot object is primarily to allow for more customization by the user.
Value
Either an animated plot created by ggplotly
(if
return_ggplot = FALSE
) or a ggplot object (if return_ggplot = TRUE
)
Examples
data(gentry)
gentry_small = subset_samples(gentry, Precip > 4000)
longitude_distance = dist(sample_data(gentry_small)$Long)
plot_all_pairs(gentry_small, longitude_distance)