metacoder (version 0.1.2)

obs_data: Return observation data from taxmap

Description

Return a table of data associated with taxa of and object of type taxmap.

Usage

obs_data(obj, row_subset = NULL, col_subset = NULL, calculated_cols = TRUE, sort_by = NULL, decreasing = FALSE, drop = FALSE)

Arguments

obj
row_subset
(character) The obs_ids of a subset of obj. Default: All rows.
col_subset
(character) The names of columns, either user defined or generated using obs_funcs. Default: All columns.
calculated_cols
(logical of length 1) If TRUE, return calculated columns using functions in taxmap$obs_funcs. These values are calculated each time obs_data is called since their values can change if the data is subset.
sort_by
(character of length 1) The name of a column in obj$obs_data or a function name in obj$obs_funcs. This column will be used to sort the output rows. If NULL, no sorting will be done.
decreasing
(logical of length 1) If TRUE, sort_by order is decreasing.
drop
(logical of length 1) If TRUE, if subset is a single column name, then a vector is returned instead of a data.frame

Value

A data.frame or vector with rows corresponding to taxa in input