taxa (version 0.1.0)

leaves: Get leaf taxa

Description

Return the leaf taxa for a taxonomy() or taxmap() object. Leaf taxa are taxa with no subtaxa.

obj$leaves(subset = NULL, value = NULL)
leaves(obj, subset = NULL, value = NULL)

Arguments

obj

The taxonomy() or taxmap() object containing taxon information to be queried.

subset

(character) Taxon IDs for which leaf taxa will be returned. Default: All taxon in obj will be used.

value

What data to return. This is usually the name of column in a table in obj$data. Any result of all_names(obj) can be used, but it usually only makes sense to data that corresponds to taxa 1:1, such as taxon_ranks(). By default, taxon indexes are returned.

Value

character

See Also

Other taxonomy indexing functions: roots, stems, subtaxa, supertaxa

Examples

Run this code
# NOT RUN {
# Return indexes of leaf taxa
leaves(ex_taxmap)

# Return indexes for a subset of taxa
leaves(ex_taxmap, subset = 2:17)

# Return something besides taxon indexes
leaves(ex_taxmap, value = "taxon_names")

# }

Run the code above in your browser using DataCamp Workspace