Learn R Programming

binomen (version 0.1.2)

strain: Parse taxon or taxondf objects by a range of names

Description

Parse taxon or taxondf objects by a range of names

Usage

strain(.data, ...)

Arguments

.data
Input, object of class taxon
...
Logical predicates. Multiple conditions are combined with &. See Details.

Value

A single or list of taxon class objects

Details

Example predicates:
  • . > family = Get all taxa greater than family
  • . < family = Get all taxa less than family
  • . == family = Get all taxa equal to family
  • . != family = Get all taxa not equal to family
  • genus < order = Get all taxa between genus and order
  • genus .. family = Get all taxa between genus and order

Examples

Run this code
# operating on `taxon` objects
out <- make_taxon(genus="Poa", epithet="annua", authority="L.",
   family='Poaceae', clazz='Poales', kingdom='Plantae', variety='annua')
out %>% strain(. < family)
out %>% strain(. < genus)
out %>% strain(. > family)
out %>% strain(. < family)

Run the code above in your browser using DataLab