plot_ordered_bar: bar plot ordered across samples

Description Usage Arguments Value Examples

Description

This function plots a bar plot from a phyloseq object. The author of this fuction is GitHub user pjames1 in this thread.

Usage

1
2
plot_ordered_bar(ps, x = "Sample_ID", y = "Abundance", fill = NULL,
  leg_size = 0.5, title = NULL)

Arguments

ps

A phyloseq object.

x

the varaiable in the sample_data that you want on the x-axis. Defaults to "Sample_ID".

y

the varaiable in the sample_data that you want on the y-axis. Defaults to "Abundance".

fill

the varaiable in the sample_data that you want to color by.

leg_size

a number indicating the legend.key.size The default value is 0.5.

title

(optional) the title of the plot.

Value

This function returns a bar plot that is ordered similarly across samples.

Examples

1
2
plot_ordered_bar(ps)
plot_ordered_bar(ps, x = "Sample_ID", y = "Abundance", fill = Genus, title = "Sample Abundance")

DanielSprockett/reltools documentation built on May 5, 2019, 12:27 p.m.