Project Status: Moved to https://github.com/ropensci/taxa – The project has been moved to a new location, and the version at that location should be considered authoritative. to https://github.com/ropensci/taxa

MOST FUNCTIONALITY OF THIS PACKAGE HAS MOVED TO THE taxa PACKAGE. THIS PACKAGE IS NOW ARCHIVED ON CRAN

binomen provides various taxonomic classes for defining a single taxon, multiple taxa, and a taxonomic data.frame

It is designed as a companion to taxize, where you can get taxonomic data on taxonomic names from the web.

classes (S3)

  • taxon
  • taxonref
  • taxonrefs
  • binomial
  • grouping (i.e., classification - used different term to avoid conflict with classification in taxize)

verbs

  • gethier() - get hierarchy from a taxon class
  • scatter() - make each row in taxonomic data.frame (taxondf) a separate taxon object within a single taxa object
  • assemble() - make a taxa object into a taxondf data.frame
  • pick() - pick out one or more taxonomic groups
  • pop() - pop out (drop) one or more taxonomic groups
  • span() - pick a range between two taxonomic groups (inclusive)
  • strain() - filter by taxonomic groups, like dplyr’s filter
  • name() - get the taxon name for each taxonref object
  • uri() - get the reference uri for each taxonref object
  • rank() - get the taxonomic rank for each taxonref object
  • id() - get the reference uri for each taxonref object

Installation

Stable CRAN version

install.packages("binomen")

Development GitHub version

install.packages("devtools")
devtools::install_github("ropensci/binomen")
library('binomen')

Taxonomic data.frame’s

Make one

df <- data.frame(order = c('Asterales','Asterales','Fagales','Poales','Poales','Poales'),
  family = c('Asteraceae','Asteraceae','Fagaceae','Poaceae','Poaceae','Poaceae'),
  genus = c('Helianthus','Helianthus','Quercus','Poa','Festuca','Holodiscus'),
  stringsAsFactors = FALSE)
(df2 <- taxon_df(df))
#>       order     family      genus
#> 1 Asterales Asteraceae Helianthus
#> 2 Asterales Asteraceae Helianthus
#> 3   Fagales   Fagaceae    Quercus
#> 4    Poales    Poaceae        Poa
#> 5    Poales    Poaceae    Festuca
#> 6    Poales    Poaceae Holodiscus

Parse - get rank order via pick()

get ranks order, family, and genus via pick()

get range of names via span(), from rank X to rank Y

Separate each row into a taxon class (many taxon objects are a taxa class)

And you can re-assemble a data.frame from the output of scatter() with assemble()

ToDo

See our issue tracker to see what we have planned

Meta

ropensci