View source: R/plotCommunity.r
plotCommunity | R Documentation |
Function to produce a bar or violin plot of an individual community.
plotCommunity(counts, type = "bar", xlabels = NULL, xcols = NULL,
res = 50, cutoff = NULL)
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. |
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.
A list of the statistics for each strain as generated by boxplot().
Chris Field <fieldc@ethz.ch>
None
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.