create_dataset: Create Dataset object

View source: R/create_dataset.r

create_datasetR Documentation

Create Dataset object

Description

Takes an abundance matrix, a metadata data.frame and (optionally) a taxonomy definition, and creates a Dataset object.

Usage

create_dataset(Tab = NULL, Map = NULL, Tax = NULL)

Arguments

Tab

A numeric matrix (or a numerci object coercible into a matrix) of S x N dimensions. Whenre S is the number of different taxa (OTUs, taxonomic levels etc), and N the number of samples. The rows and columns must be named with the ID of taxons and samples respectively

Map

Optional data.frame of dimensions N x p, where N is the number of samples and p the number of variables for which there is information. The rows must be named with the sample IDs, and these IDs must correspond to the same order as in the Tab argument

Tax

Optional data.frame of dimensions S x 2, where S is the number of taxons. The rows. must be named according to the taxon IDs, which should correspond to the txons in the Tab argument. The dataframe must contain columns ID and Taxonomy, which contain the Taxa ID and the taxonomy string, in the RDP classifier format

Value

Returns a list of class Dataset with the following elements:

Tab

A numeric matrix containing counts of species (rows) per sample (columns)

Map

A data.frame containing the Metadata for samples in Tab

Tax

Optional data.frame containing taxonomic annotation for species in Tab

Author(s)

Sur Herrera Paredes


surh/AMOR documentation built on Feb. 21, 2023, 6:31 a.m.