plotbar: plot bar for relative abundance for bacteria

Description Usage Arguments Value Author(s) Examples

View source: R/plot.R

Description

plot bar for relative abundance for bacteria

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotbar(
  physeq,
  level = "Phylum",
  color = NULL,
  group = NULL,
  top = 5,
  return = FALSE,
  fontsize.x = 5,
  fontsize.y = 12
)

Arguments

physeq

A phyloseq object containing merged information of abundance, taxonomic assignment, sample data including the measured variables and categorical information of the samples, and / or phylogenetic tree if available.

level

the level to plot

color

A vector of character use specifying the color

group

group (Optional). A character string specifying the name of a categorical variable containing grouping information.

top

the number of most abundance bacteria to display

return

return the data with the relative abundance

fontsize.x

the size of x axis label

fontsize.y

the size of y axis label

Value

Returns a ggplot object. This can further be manipulated as preferred by user.

Author(s)

Kai Guo

Examples

1
2
3
data("Physeq")
phy<-normalize(physeq)
plotbar(phy,level="Phylum")

microbial documentation built on Nov. 1, 2021, 5:08 p.m.