map_data_: Create a mapping without NSE

Description Arguments Value See Also Examples

View source: R/taxonomy--s3.R

Description

Creates a named vector that maps the values of two variables associated with taxa in a taxonomy() or taxmap() object without using Non-Standard Evaluation (NSE). Both values must be named by taxon ids. This is the same as map_data() without NSE and can be useful in some odd cases where NSE fails to work as expected.

1
2
obj$map_data(from, to)
map_data(obj, from, to)

Arguments

obj

The taxonomy() or taxmap() object.

from

The value used to name the output. There will be one output value for each value in from.

to

The value returned in the output.

Value

A vector of to values named by values in from.

See Also

Other taxonomy data functions: classifications, id_classifications, is_branch, is_internode, is_leaf, is_root, is_stem, map_data, n_leaves_1, n_leaves, n_subtaxa_1, n_subtaxa, n_supertaxa_1, n_supertaxa, taxon_ids, taxon_indexes, taxon_names, taxon_ranks

Examples

1
2
3
x = c("d" = "looks like a cat", "h" = "big scary cats",
      "i" = "smaller cats", "m" = "might eat you", "n" = "Meow! (Feed me!)")
map_data_(ex_taxmap, from = ex_taxmap$taxon_names(), to = x)

taxa documentation built on Aug. 10, 2018, 1:12 a.m.