Count the number of unique taxa represented by cluster(s) or sequences in phylota table Use rnk to specify a taxonomic level to count. If NULL counts will be made to the lowest level reported on NCBI.

get_ntaxa(phylota, cid = NULL, sid = NULL, rnk = NULL,
  keep_higher = FALSE)

Arguments

phylota

Phylota object

cid

Cluster ID(s)

sid

Sequence ID(s)

rnk

Taxonomic rank

keep_higher

Keep higher taxonomic ranks?

Value

vector

See also

Examples

data('bromeliads') # how many species are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'species'))
#> 0 #> 891
# how many genera are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'genus'))
#> 0 #> 65
# how many families are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'family'))
#> 0 #> 1
# use list_ncbi_ranks() to see available rank names (list_ncbi_ranks())
#> [1] "superkingdom" "kingdom" "phylum" "subphylum" "class" #> [6] "superorder" "order" "suborder" "infraorder" "parvorder" #> [11] "family" "genus" "species" "subspecies"