Learn R Programming

RAM (version 1.2.1.3)

group.temporal: Plot Temporal Trends for Metadata and Taxon Groups

Description

This function consumes an OTU table and its associated metadata, and creates a plot showing how the collections of taxonomic groups, as well as metadata factors, evolve over time.

Usage

group.temporal(data, meta, date.col, factors, rank, group, file = NULL, ext = NULL, height = 8, width = 12)

Arguments

data
the OTU table to be used.
meta
the metadata table to be used.
date.col
a character vector specifying which column of the metadata has date information (see RAM.dates).
factors
a named character vector specifying the names of the metadata columns to be plotted with the taxon group data. (see RAM.factors). NOTE: these factors must be numeric variables.
rank
a character vector specifying the rank of the desired taxon groups. Note that all groups should come the same rank. (see RAM.rank.formatting).
group
a character vector giving the names of the groups to be plotted.
file
the file path where the image should be created (see ?RAM.plotting).
ext
the file type to be used; one of "pdf", "png", "tiff", "bmp", "jpg", or "svg".
height
the height of the image to be created (in inches).
width
the width of the image to be created (in inches).

Details

The image created will contain several plots. It will always contain a large panel showing the counts collected for the specified taxon groups over time, and above that panel (on a common x-axis) will be a line graph for each metadata factor specified.

Examples

Run this code
data(ITS1, meta)
group.temporal(ITS1, meta, date.col="Harvestdate",
               factors=c(Ergosterol="Ergosterol_ppm"),
               rank="p", group=c("Ascomycota", "Basidiomycota"))

Run the code above in your browser using DataLab