group.spatial: Plot Spatial Collection Trends for Taxon Groups

Description Usage Arguments Details Author(s) References Examples

Description

This function consumes an OTU table and its associated metadata table, and uses that information to produce a choropleth (essentially a heatmap, but superimposed imposed on an actual, cartographic map) to show how many counts of each taxon group were detected in each Canadian province/territory.

Usage

1
2
3
group.spatial(data, meta, date.col, province.col, rank, group,
              breaks = "year", file = NULL, ext = NULL,
              height = 8, width = 10)

Arguments

data

the OTU table to be used.

meta

the metadata table to be used.

date.col

a character vector specifying which column in metadata contains the date information (see RAM.dates).

province.col

a character vector specifying which column in metadata contains the province information (see Details).

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.

breaks

how many time segments should be plotted; see Details.

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

This function currently only supports Canadian data. The entries in meta$province.col should be specified as provinces, using the standard postal abbreviations (e.g. "Ontario" would be "ON").

The breaks argument is slightly buggy at the moment, possibly due to how R tries to split Date objects. breaks can be either an integer, in which case it will attempt to create that many levels (i.e. setting breaks=3 should split the data into three date 'blocks'.) breaks can also be a character vectors, such as "quarter" or "year" which attempts to split the date information accordingly. See cut.Date for more details and a complete specification of what is allowed for breaks.

Author(s)

Wen Chen and Joshua Simpson.

References

The file used to create the map of Canada is from GeoBase and is licensed under the Open Government License - Canada.

Examples

1
2
3
4
5
6
7
8
data(ITS1, meta)
## Not run: 
group.spatial(ITS1, meta, date.col="Harvestdate",
              province.col="Province", rank="p",
              group=c("Ascomycota", "Basidiomycota"),
              breaks=2)

## End(Not run)

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