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

Description Usage Arguments Details Note Author(s) Examples

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

1
2
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.

Note

If your data has collections being taken roughly annually, you may have a large amount of "empty space" in the middle of your plot. Consider subsetting the data by year, and plotting each year individually using this function.

Author(s)

Wen Chen and Joshua Simpson

Examples

1
2
3
4
data(ITS1, meta)
group.temporal(ITS1, meta, date.col="Harvestdate",
               factors=c(Ergosterol="Ergosterol_ppm"),
               rank="p", group=c("Ascomycota", "Basidiomycota"))

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied

RAM documentation built on May 2, 2019, 3:04 p.m.