abundanceMatrix: Create a community matrix of taxon abundances

Description Usage Arguments Details Value Author(s) Examples

View source: R/abundanceMatrix.R

Description

Creates a community matrix of taxon abundances, with samples as rows and species as columns, from a data frame.

Usage

1
abundanceMatrix(Data, Rows = "geoplate", Columns = "genus")

Arguments

Data

A data.frame of taxonomic occurrences. Must have at least two columns. One column representing the samples, and one column representing the taxa.

Rows

A characer string

Columns

A character string

Details

Note that older versions of this function automatically checked for and removed hanging factors. However, this is something that should really be dictated by the user, and that step is no longer a part of the function. This is unlikely to introduce any breaking changes in older scripts, but we note it here for documentation purposes..

Value

A numeric matrix of taxon abundances. Samples as the rownames and species as the column names.

Author(s)

Andrew A. Zaffos

Examples

1
2
3
4
5
6
7
8
# Download a test dataset of pleistocene bivalves.
# DataPBDB<-downloadPBDB(Taxa="Bivalvia", StartInterval="Pleistocene", StopInterval="Pleistocene")

# Clean the genus column
# DataPBDB<-cleanTaxonomy(DataPBDB,"genus")

# Create a community matrix of genera by tectonic plate id#
# CommunityMatrix<-abundanceMatrix(Data=DataPBDB, Rows="geoplate", Columns="genus")

velociraptr documentation built on Aug. 1, 2019, 1:05 a.m.