Return the taxon indexes in a taxonomy() or taxmap() object. They are the indexes of the edge list rows.

obj$taxon_indexes()
taxon_indexes(obj)

Arguments

obj

The taxonomy() or taxmap() object.

See also

Examples

# Return the indexes for each taxon taxon_indexes(ex_taxmap)
#> b c d e f g h i j k l m n o p q r #> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Use in another function (stupid example; 1:5 would work too) filter_taxa(ex_taxmap, taxon_indexes < 5)
#> <Taxmap> #> 4 taxa: b. Mammalia, c. Plantae, d. Felidae, e. Notoryctidae #> 4 edges: NA->b, NA->c, b->d, b->e #> 4 data sets: #> info: #> # A tibble: 6 x 4 #> taxon_id name n_legs dangerous #> <chr> <chr> <dbl> <lgl> #> 1 d tiger 4 TRUE #> 2 d cat 4 FALSE #> 3 e mole 4 FALSE #> # … with 3 more rows #> phylopic_ids: a named vector of 'character' with 6 items #> d. e148eabb-f138-43[truncated] ... c. 63604565-0406-46[truncated] #> foods: a list of 6 items named by taxa: #> d, d, e, b, c, c #> abund: #> # A tibble: 8 x 5 #> taxon_id code sample_id count taxon_index #> <chr> <fct> <fct> <dbl> <int> #> 1 d T A 1 1 #> 2 d C A 2 2 #> 3 e M B 5 3 #> # … with 5 more rows #> 1 functions: #> reaction