abundanceMatrix {velociraptr} | R Documentation |
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 |
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
# 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")
[Package velociraptr version 1.1.0 Index]