Learn R Programming

velociraptr (version 1.0)

abundanceMatrix: Create a community matrix of taxon abundances.

Description

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

Usage

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

Value

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

Examples

Run this code
# NOT RUN {
# 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")

# }

Run the code above in your browser using DataLab