plotCommunity: Function to produce a bar or violin plot of an individual...

View source: R/plotCommunity.r

plotCommunityR Documentation

Function to produce a bar or violin plot of an individual community.

Description

Function to produce a bar or violin plot of an individual community.

Usage

plotCommunity(counts, type = "bar", xlabels = NULL, xcols = NULL,
  res = 50, cutoff = NULL)

Arguments

counts

A count table in which the rows are strains or OTUs and the columns are samples. The table should include only a single sample group.

type

Determines the plot style, either 'bar', 'violin', 'points', 'swarm', 'barswarm' or 'violinswarm'.

xlabels

An optional vector of strain names, the default is to use the row names of the count table.

xcols

An optional vector of strain colours, the default is to use rainbow().

res

The resolution of the histograms used to create the violins for that plot style.

cutoff

A numeric integer, which if provided reduces the plot to only the given number of most abundant strains.

Details

For each strain, samples in which they were not observed are counted and separated from the main bar or violin. As a result, the number of samples in each bar or violin varies, and the histogram for each violin is therefore normalised.

Value

A list of the statistics for each strain as generated by boxplot().

Author(s)

Chris Field <fieldc@ethz.ch>

Examples

None

cmfield/phylloR documentation built on Aug. 25, 2023, 10:07 a.m.