View source: R/option_parsers.R
get_taxmap_other_cols | R Documentation |
Parse the other_cols option used in many calculation functions.
get_taxmap_other_cols(obj, data, cols, other_cols = NULL)
obj |
A taxmap object |
data |
The name of a table in |
cols |
The names/indexes of columns in
|
other_cols |
Preserve in the output non-target columns present in the input data. The "taxon_id" column will always be preserved. Takes one of the following inputs:
|
Other option parsers:
get_taxmap_cols()
,
get_taxmap_data()
,
get_taxmap_table()
,
verify_taxmap()
## Not run:
# Parse data for examples
x = parse_tax_data(hmp_otus, class_cols = "lineage", class_sep = ";",
class_key = c(tax_rank = "taxon_rank", tax_name = "taxon_name"),
class_regex = "^(.+)__(.+)$")
# If all cols are used, there are no other cols, only "taxon_id"
metacoder:::get_taxmap_other_cols(x, data = "tax_data", cols = TRUE)
# If a subset of target columns is specified, the rest are returned
metacoder:::get_taxmap_other_cols(x, data = "tax_data", cols = 2:3)
# Additionally, a subset of other columns can be specified
metacoder:::get_taxmap_other_cols(x, data = "tax_data", cols = 2:3,
other_cols = 4:5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.