Parses scientific names into their component parts (genus, species, variety, author, etc).

ts_parse_names(
  taxa,
  tbl_out = getOption("ts_tbl_out", default = FALSE),
  quiet = FALSE,
  strip_qualifiers = FALSE,
  exclude_placeholders = TRUE
)

Arguments

taxa

Character vector; taxon names to be parsed. Missing values not allowed. Must all be unique.

tbl_out

Logical vector of length 1; should a tibble be returned? If FALSE (default), output will be a data.frame. This argument can be controlled via the option ts_tbl_out; see Examples.

quiet

Logical; if TRUE, suppress warning messages that would normally be issued

strip_qualifiers

Logical; if TRUE, remove standalone open-nomenclature qualifiers (cf. and aff., as reviewed by Sigovini, Keppel, and Tagliapietra (2016); see References) from names before parsing, so e.g. "Tectaria cf. crenata" parses the same as "Tectaria crenata" instead of mis-capturing the qualifier as the specific epithet. Also strips s.l./sensu lato and s.str./sensu stricto, an older, separate circumscription convention not covered by that review but included here as a taxastand extension. Default: FALSE, to preserve prior behavior.

exclude_placeholders

Logical; if TRUE (default), names that are placeholders for an identification that stopped above species rank (sp., spp., indet., stet., inc., and their long forms; see References) are excluded from the results with a warning, like names that cannot be parsed. Otherwise "Genus sp." would be parsed as if "sp" were a real specific epithet and could then be fuzzy-matched to unrelated species.

Value

A dataframe including the following columns.

  • id: A unique ID number assigned to the input name

  • name: The input name

  • genus_hybrid_sign: Hybrid sign for genus

  • genus_name: Genus name

  • species_hybrid_sign: Hybrid sign for species

  • specific_epithet: Specific epithet (name)

  • infraspecific_rank: Infraspecific rank

  • infraspecific_epithet: Infraspecific epithet (name)

  • author: Name of taxon

References

Sigovini, M., Keppel, E., & Tagliapietra, D. (2016). Open Nomenclature in the biodiversity era. Methods in Ecology and Evolution, 7(10), 1217-1225. doi:10.1111/2041-210X.12594

Examples

ts_parse_names("Foogenus x barspecies var. foosubsp (L.) F. Bar")
#> # A tibble: 1 × 9
#>   name   id    genus_hybrid_sign genus_name species_hybrid_sign specific_epithet
#>   <chr>  <chr> <chr>             <chr>      <chr>               <chr>           
#> 1 Fooge… 5f20… NA                Foogenus   ×                   barspecies      
#> # ℹ 3 more variables: infraspecific_rank <chr>, infraspecific_epithet <chr>,
#> #   author <chr>
ts_parse_names(
  "Foogenus x barspecies var. foosubsp (L.) F. Bar",
  tbl_out = TRUE
)
#> # A tibble: 1 × 9
#>   name   id    genus_hybrid_sign genus_name species_hybrid_sign specific_epithet
#>   <chr>  <chr> <chr>             <chr>      <chr>               <chr>           
#> 1 Fooge… 5f20… NA                Foogenus   ×                   barspecies      
#> # ℹ 3 more variables: infraspecific_rank <chr>, infraspecific_epithet <chr>,
#> #   author <chr>

# If you always want tibble output without specifying `tbl_out = TRUE`
# every time, set the option:
options(ts_tbl_out = TRUE)
ts_parse_names("Foogenus x barspecies var. foosubsp (L.) F. Bar")
#> # A tibble: 1 × 9
#>   name   id    genus_hybrid_sign genus_name species_hybrid_sign specific_epithet
#>   <chr>  <chr> <chr>             <chr>      <chr>               <chr>           
#> 1 Fooge… 5f20… NA                Foogenus   ×                   barspecies      
#> # ℹ 3 more variables: infraspecific_rank <chr>, infraspecific_epithet <chr>,
#> #   author <chr>
ts_parse_names("Crepidomanes minutum (Blume) K. Iwats.")
#> # A tibble: 1 × 9
#>   name   id    genus_hybrid_sign genus_name species_hybrid_sign specific_epithet
#>   <chr>  <chr> <chr>             <chr>      <chr>               <chr>           
#> 1 Crepi… e43e… NA                Crepidoma… NA                  minutum         
#> # ℹ 3 more variables: infraspecific_rank <chr>, infraspecific_epithet <chr>,
#> #   author <chr>

# Strip an open-nomenclature qualifier before parsing
ts_parse_names("Tectaria cf. crenata", strip_qualifiers = TRUE)
#> # A tibble: 1 × 9
#>   name   id    genus_hybrid_sign genus_name species_hybrid_sign specific_epithet
#>   <chr>  <chr> <chr>             <chr>      <chr>               <chr>           
#> 1 Tecta… f59e… NA                Tectaria   NA                  crenata         
#> # ℹ 3 more variables: infraspecific_rank <chr>, infraspecific_epithet <chr>,
#> #   author <chr>