mp_plot_abundance {MicrobiotaProcess} | R Documentation |
plotting the abundance of taxa via specified taxonomy class
mp_plot_abundance( .data, .abundance = NULL, .group = NULL, taxa.class = NULL, topn = 10, relative = TRUE, force = FALSE, plot.group = FALSE, ... ) ## S4 method for signature 'MPSE' mp_plot_abundance( .data, .abundance = NULL, .group = NULL, taxa.class = NULL, topn = 10, relative = TRUE, force = FALSE, plot.group = FALSE, ... ) ## S4 method for signature 'tbl_mpse' mp_plot_abundance( .data, .abundance = NULL, .group = NULL, taxa.class = NULL, topn = 10, relative = TRUE, force = FALSE, plot.group = FALSE, ... ) ## S4 method for signature 'grouped_df_mpse' mp_plot_abundance( .data, .abundance = NULL, .group = NULL, taxa.class = NULL, topn = 10, relative = TRUE, force = FALSE, plot.group = FALSE, ... )
.data |
MPSE object or tbl_mpse object |
.abundance |
the column name of abundance to be plotted. |
.group |
the column name of group to be calculated and plotted, default is NULL. |
taxa.class |
name of taxonomy class, default is NULL, meaning the Phylum class will be plotted. |
topn |
integer the number of the top most abundant, default is 10. |
relative |
logical whether calculate the relative abundance and plotted. |
force |
logical whether calculate the relative abundance forcibly when the abundance is not be rarefied, default is FALSE. |
plot.group |
logical whether plotting the abundance of specified taxa.class taxonomy with group not sample level, default is FALSE. |
... |
additional parameters, meaningless now. |
Shuangbin Xu
## Not run: data(mouse.time.mpse) mouse.time.mpse %<>% mp_rrarefy() mouse.time.mpse mouse.time.mpse %<>% mp_cal_abundance(.abundance=RareAbundance, action="add") %>% mp_cal_abundance(.abundance=RareAbundance, .group=time, action="add") mouse.time.mpse p1 <- mouse.time.mpse %>% mp_plot_abundance(.abundance=RelRareAbundanceBySample, .group=time, taxa.class="Phylum", topn=20) p2 <- mouse.time.mpse %>% mp_plot_abundance(.abundance = Abundance, taxa.class = Phylum, topn = 20, relative = FALSE, force = TRUE ) p3 <- mouse.time.mpse %>% mp_plot_abundance(.abundance = RareAbundance, .group = time, taxa.class = Phylum, topn = 20, relative = FALSE, force = TRUE ) p4 <- mouse.time.mpse %>% mp_plot_abundance(.abundance = RareAbundance, .group = time, taxa.class = Phylum, topn = 20, relative = FALSE, force = TRUE, plot.group = TRUE ) ## End(Not run)