Test if taxa are "internodes" in a taxonomy()
or taxmap()
object. An
internode is any taxon with a single immediate supertaxon and a single immediate
subtaxon. They can be removed from a tree without any loss of information on
the relative relationship between remaining taxa.
obj$is_internode() is_internode(obj)
obj | The |
---|
A logical
of length equal to the number of taxa.
Other taxonomy data functions:
classifications()
,
id_classifications()
,
is_branch()
,
is_leaf()
,
is_root()
,
is_stem()
,
map_data_()
,
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()
# Test for which taxon IDs correspond to internodes is_internode(ex_taxmap)#> b c d e f g h i j k l m n #> FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE #> o p q r #> FALSE FALSE FALSE FALSE#> <Taxmap> #> 10 taxa: b. Mammalia, c. Plantae ... r. tuberosum #> 10 edges: NA->b, NA->c, b->d, c->l ... b->o, b->p, l->q, l->r #> 4 data sets: #> info: #> # A tibble: 6 x 4 #> taxon_id name n_legs dangerous #> <chr> <chr> <dbl> <lgl> #> 1 m tiger 4 TRUE #> 2 n cat 4 FALSE #> 3 o mole 4 FALSE #> # … with 3 more rows #> phylopic_ids: a named vector of 'character' with 6 items #> m. e148eabb-f138-43[truncated] ... r. 63604565-0406-46[truncated] #> foods: a list of 6 items named by taxa: #> m, n, o, p, q, r #> abund: #> # A tibble: 8 x 5 #> taxon_id code sample_id count taxon_index #> <chr> <fct> <fct> <dbl> <int> #> 1 m T A 1 1 #> 2 n C A 2 2 #> 3 o M B 5 3 #> # … with 5 more rows #> 1 functions: #> reaction