View source: R/plot_functions.R
treemap_pq | R Documentation |
Note that lvl2need to be nested in lvl1
treemap_pq(
physeq,
lvl1,
lvl2,
nb_seq = TRUE,
log10trans = TRUE,
plot_legend = FALSE,
...
)
physeq |
(required): a |
lvl1 |
(required) Name of the first (higher) taxonomic rank of interest |
lvl2 |
(required) Name of the second (lower) taxonomic rank of interest |
nb_seq |
(logical; default TRUE) If set to FALSE, only the number of ASV is count. Concretely, physeq otu_table is transformed in a binary otu_table (each value different from zero is set to one) |
log10trans |
(logical, default TRUE) If TRUE, the number of sequences (or ASV if nb_seq = FALSE) is log10 transformed. |
plot_legend |
(logical, default FALSE) If TRUE, plot che legend of color for lvl 1 |
... |
Other arguments passed on to |
A ggplot2 graphic
Adrien Taudière
data(data_fungi_sp_known)
if (requireNamespace("treemapify")) {
treemap_pq(
clean_pq(subset_taxa(
data_fungi_sp_known,
Phylum == "Basidiomycota"
)),
"Order", "Class",
plot_legend = TRUE
)
}
if (requireNamespace("treemapify")) {
treemap_pq(
clean_pq(subset_taxa(
data_fungi_sp_known,
Phylum == "Basidiomycota"
)),
"Order", "Class",
log10trans = FALSE
)
treemap_pq(
clean_pq(subset_taxa(
data_fungi_sp_known,
Phylum == "Basidiomycota"
)),
"Order", "Class",
nb_seq = FALSE, log10trans = FALSE
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.