Learn R Programming

taxa

This is an R package that provides classes to store and manipulate taxonomic data. Most of the classes can be used like base R vectors. This project is a partial rewrite of the previous version of taxa and is currently under development.

A note about recent changes:

This is beginning of a complete rewrite of the previous taxa package to make the more basic component classes more like base R vectors. The taxmap class is not yet reimplemented, but will be similar to the class in the previous versions of taxa. The old version of taxa has been incorporated into the metacoder package until this version of taxa is mature, at which time metacoder will also use this version.

Contributors

Comments and contributions

We welcome comments, criticisms, and especially contributions! GitHub issues are the preferred way to report bugs, ask questions, or request new features. You can submit issues here:

https://github.com/ropensci/taxa/issues

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for taxa in R doing citation(package = 'taxa')
  • Please note that this project is released with a Contributor Code of Conduct (see CONDUCT.md). By participating in this project you agree to abide by its terms.

Copy Link

Version

Install

install.packages('taxa')

Monthly Downloads

291

Version

0.4.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Zachary Foster

Last Published

July 28th, 2025

Functions in taxa (0.4.4)

is_classification

Check if is a classification
is_internode

Check if taxa are internodes
is_leaf

Check if taxa are leaves
internodes

Get internodes
is_taxonomy

Check if something is a taxonomy
is_stem

Check if taxa are stems
is_taxon_db

Check if something is a taxon_db
leaves

Get leaves
is_valid_regex

Check regex validity
n_leaves

Number of leaves per taxon
is_taxon_id

Check if something is a taxon_id object
matches

dplyr select_helpers
limited_print

Print a subset of a character vector
is_taxon_rank

Check if something is a taxon_rank
n_subtaxa

Number of subtaxa per taxon
is_taxon_rank_level

Check if is a taxon id
new_taxon_rank

Minimal taxon_rank constructor
new_classification

Minimal classfication constructor
new_taxon_rank_level

Minimal taxon_rank_level constructor
new_taxon_db

Minimal taxon_db constructor
new_taxon_authority

Minimal taxon_authority constructor
new_taxon_db_def

Minimal taxon_db_def constructor
new_taxon_id

Minimal taxon_id constructor
n_supertaxa

Number of supertaxa per taxon
printed_classification

Prepare classification for printing
printed_taxon_rank

Prepare taxon_rank for printing
printed_taxon

Prepare taxon for printing
new_taxonomy

Minimal taxonomy constructor
printed_taxon_rank_level

Prepare taxon_rank_level for printing
num_range

dplyr select_helpers
tax_auth.taxa_classification

Set and get taxon authorities
roots

Get root taxa
supertaxa

Get supertaxa
subtaxa

Get subtaxa
printed_taxon_id

Prepare taxon_id for printing
print_with_color

Print that works with color
printed_taxonomy

Prepare taxonomy for printing
one_of

dplyr select_helpers
new_taxon

Minimal taxon constructor
stems

Get stems
rank_ref

All known taxonomic ranks
tax_author.taxa_classification

Set and get taxon authors
starts_with

dplyr select_helpers
printed_taxon_authority

Prepare taxon_authority for printing
tax_cite.taxa_classification

Set and get taxon authority citations
rank_level_color_funcs

Get font color for levels
tax_id.taxa_classification

Set and get taxon IDs
format.taxa_classification

taxa printing functions
tax_date.taxa_classification

Set and get taxon authority dates
tax_name.taxa_classification

Set and get taxon names
tax_rank.taxa_classification

Set and get taxon ranks
tax_db.taxa_classification

Set and get taxon ID databases
taxa_comparison_funcs

taxa comparison functions
vec_ptype2.taxa_classification

taxa coercion functions
vec_cast.taxa_classification

taxa casting functions
taxa_taxonomy-class

Taxonomy class
taxa_taxon_rank-class

Taxon rank class
taxa_taxon_db-class

Taxon database class
taxon_db

Taxon database class
taxon

Taxon class
taxa_taxon-class

Taxon class
taxa_taxon_authority-class

Taxon authority class
taxon_db_def

Taxon database definition class
taxon_authority

Taxon authority class
[.taxa_classification

Taxonomy class
taxon_id

Taxon ID class
taxa_taxon_id-class

Taxon ID class
taxon_rank

Taxon rank class
unname_fields

Remove names from fields in a vctrs rcrd
taxon_rank_level

Taxon rank level
as_taxon

Convert to a taxon vector
db_ref

Valid taxonomy databases
classification

Taxon class
as_data_frame

Convert a taxa object to a data.frame
%in%

Value matching for taxa package
is_taxon

Check if something is a taxon object
is_root

Test if taxa are roots
everything

dplyr select_helpers
%>%

magrittr forward-pipe operator
contains

dplyr select_helpers
database_ref

Database list
impute_order_na

Fill in NA values in sequence
duplicated_index

Returns the index of the first occurrence of each unique element
default_db_ref

Defines valid taxonomic databases
font_default

Default font
font_punct

Punctuation formatting in print methods
font_na

Font for NAs in print methods
interleave

Interleaves two vectors
delete_unused_class_taxa

Removes taxa from the taxonomy of a classification that are not used by any of the instances
check_taxon_rank_order

Check that order is ascending
font_secondary

Font for secondary data
is_taxon_authority

Check if is a taxon_authority
font_tax_name

Taxon name formatting in print methods
duplicated_index_taxonomy

Returns the index of the first occurrence of each unique taxon in a taxonomy
ends_with

dplyr select_helpers