View source: R/plot_functions.R
ggbetween_pq | R Documentation |
Note that contrary to hill_pq()
, this function does not take into
account for difference in the number of sequences per samples/modalities.
You may use rarefy_by_sample = TRUE if the mean number of sequences per
samples differs among modalities.
Basically a wrapper of function ggstatsplot::ggbetweenstats()
for
object of class phyloseq
ggbetween_pq(physeq, fact, one_plot = FALSE, rarefy_by_sample = FALSE, ...)
physeq |
(required): a |
fact |
(required): The variable to test. Must be present in
the |
one_plot |
(logical, default FALSE) If TRUE, return a unique plot with the three plot inside using the patchwork package. |
rarefy_by_sample |
(logical, default FALSE) If TRUE, rarefy
samples using |
... |
Other arguments passed on to |
This function is mainly a wrapper of the work of others.
Please make a reference to ggstatsplot::ggbetweenstats()
if you
use this function.
Either an unique ggplot2 object (if one_plot is TRUE) or a list of 3 ggplot2 plot:
plot_Hill_0 : the ggbetweenstats of Hill number 0 (= species richness) against the variable fact
plot_Hill_1 : the ggbetweenstats of Hill number 1 (= Shannon index) against the variable fact
plot_Hill_2 : the ggbetweenstats of Hill number 2 (= Simpson index) against the variable fact
Adrien Taudière
if (requireNamespace("ggstatsplot")) {
p <- ggbetween_pq(data_fungi, fact = "Time", p.adjust.method = "BH")
p[[1]]
ggbetween_pq(data_fungi, fact = "Height", one_plot = TRUE)
ggbetween_pq(data_fungi, fact = "Height", one_plot = TRUE, rarefy_by_sample = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.