Barplot based on ggplot2
Usage
plot_barplot(
object,
fill = c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species"),
top_n = 5,
show.legend,
what = c("sum_intensity", "mean_intensity", "median_intensity"),
na.rm = TRUE,
relative = TRUE,
re_calculate_relative = FALSE,
x = "sample_id",
color = "balck",
facet_grid,
...
)
# S3 method for class 'microbiome_dataset'
plot_barplot(
object,
fill = c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species"),
top_n = 5,
show.legend,
what = c("sum_intensity", "mean_intensity", "median_intensity"),
na.rm = TRUE,
relative = TRUE,
re_calculate_relative = FALSE,
x = "sample_id",
color = "balck",
facet_grid,
...
)Arguments
- object
microbiome_dataset
- fill
fill for barplot
- top_n
default is 5
- show.legend
show.legend or not
- what
which you want to mutate
- na.rm
na.rm
- relative
relative intensity or not.
- re_calculate_relative
re-calculate relative abundance or not.
- x
x axis
- color
color for barplot
- facet_grid
facet_grid
- ...
other params
Examples
data("global_patterns", package = "microbiomedataset")
p <- plot_barplot(
object = global_patterns,
fill = "Phylum",
top_n = 5,
x = "SampleType"
)
p
