Return the stem taxa for a taxonomy()
or a taxmap()
object. Stem taxa are all those from the roots to the first taxon with more
than one subtaxon.
obj$stems(subset = NULL, simplify = FALSE, value = "taxon_indexes", exclude_leaves = FALSE) stems(obj, subset = NULL, simplify = FALSE, value = "taxon_indexes", exclude_leaves = FALSE)
obj | The |
---|---|
subset | Taxon IDs, TRUE/FALSE vector, or taxon indexes to find stems for.
Default: All taxa in |
value | What data to return. This is usually the name of column in a
table in |
simplify | ( |
exclude_leaves | ( |
character
Other taxonomy indexing functions:
branches()
,
internodes()
,
leaves()
,
roots()
,
subtaxa()
,
supertaxa()
# Return indexes of stem taxa stems(ex_taxmap)#> $b #> named integer(0) #> #> $c #> c g #> 2 6 #># Return indexes for a subset of taxa stems(ex_taxmap, subset = 2:17)#> $c #> c g #> 2 6 #> #> $d #> named integer(0) #> #> $e #> e j o #> 4 9 14 #> #> $f #> f k p #> 5 10 15 #># Return something besides taxon indexes stems(ex_taxmap, value = "taxon_names")#> $b #> named character(0) #> #> $c #> c g #> "Plantae" "Solanaceae" #># Return a vector instead of a list stems(ex_taxmap, value = "taxon_names", simplify = TRUE)#> c g #> "Plantae" "Solanaceae"