ggaluv_pq | R Documentation |
Basically a wrapper of ggalluvial package
ggaluv_pq(
physeq,
taxa_ranks = c("Phylum", "Class", "Order", "Family"),
wrap_factor = NULL,
by_sample = FALSE,
rarefy_by_sample = FALSE,
fact = NULL,
type = "nb_seq",
width = 1.2,
min.size = 3,
na_remove = FALSE,
use_ggfittext = FALSE,
use_geom_label = FALSE,
size_lab = 2,
...
)
physeq |
(required): a |
taxa_ranks |
A vector of taxonomic ranks. For examples c("Family","Genus"). If taxa ranks is not set (default value = c("Phylum", "Class", "Order", "Family")). |
wrap_factor |
A name to determine
which samples to merge using |
by_sample |
(logical) If FALSE (default), sample information is not taking into account, so the taxonomy is studied globally. If fact is not NULL, by_sample is automatically set to TRUE. |
rarefy_by_sample |
(logical, default FALSE) If TRUE, rarefy
samples using |
fact |
(required) Name of the factor in |
type |
If "nb_seq" (default), the number of sequences is used in plot. If "nb_taxa", the number of ASV is plotted. |
width |
(passed on to |
min.size |
(passed on to |
na_remove |
(logical, default FALSE) If set to TRUE, remove samples with NA in the variables set in formula. |
use_ggfittext |
(logical, default FALSE) Do we use ggfittext to plot labels? |
use_geom_label |
(logical, default FALSE) Do we use geom_label to plot labels? |
size_lab |
Size for label if use_ggfittext is FALSE |
... |
Other arguments passed on to |
This function is mainly a wrapper of the work of others.
Please make a reference to ggalluvial
package if you
use this function.
A ggplot object
Adrien Taudière
sankey_pq()
if (requireNamespace("ggalluvial")) {
ggaluv_pq(data_fungi_mini)
}
if (requireNamespace("ggalluvial")) {
ggaluv_pq(data_fungi_mini, type = "nb_taxa")
ggaluv_pq(data_fungi_mini, wrap_factor = "Height", by_sample = TRUE, type = "nb_taxa") +
facet_wrap("Height")
ggaluv_pq(data_fungi_mini,
width = 0.9, min.size = 10,
type = "nb_taxa", taxa_ranks = c("Phylum", "Class", "Order", "Family", "Genus")
) +
coord_flip() + scale_x_discrete(limits = rev)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.