Description Usage Arguments Value Author(s) Examples
View source: R/lefse_barplot.R
Draw a bar plot using the lefse analysis results
1 | lefse_barplot(data, size = 0.5, col = NULL, type = "npg")
|
data |
a data frame containing markers, grouping and LDA_value information |
size |
the width of bar |
col |
the col of bars, default value if NULL |
type |
the color type of gfun::scale_color_manual2 |
a ggplot2 bar plot
Zhonghui Gai
1 2 3 4 5 6 | library(gfun)
lefse.genus <- data.in("g_LDA.xlsx", rowname = F)
colnames(lefse.genus)[2] <- "group"
lefse.genus$markers <- factor(lefse.genus$markers, levels = lefse.genus$markers)
lefse.genus$group <- factor(lefse.genus$group, levels = c("HC", "A", "B"), labels = c("HC", "No-NAs", "TDF"))
lefse_barplot(data = lefse.genus) + ggtheme::theme_size()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.