preceding_taxon_codes: Get taxon codes of preceding taxa

View source: R/higherTaxaCodes.R

preceding_taxon_codesR Documentation

Get taxon codes of preceding taxa

Description

Find all codes that logically precede the specified codes. For instance, code "ABC" ("Anhyturbels") returns "AA" ("Histels") "ABA" ("Histoturbels") and "ABB" ("Aquiturbels"). Use in conjunction with a lookup table that maps Order, Suborder, Great Group and Subgroup taxa to their codes (see taxon_code_to_taxon and taxon_to_taxon_code).

Usage

preceding_taxon_codes(codes)

Arguments

codes

A character vector of codes to calculate preceding codes for

Details

Accounts for Keys that run out of capital letters (more than 26 subgroups) and use lowercase letters for a unique subdivision within the "fourth character position."

Value

A list with equal length to input vector; one character vector per element

See Also

decompose_taxon_code, taxon_code_to_taxon, taxon_to_taxon_code

Examples


preceding_taxon_codes(c("ABCDe", "BCDEf"))


SoilTaxonomy documentation built on Nov. 17, 2023, 1:07 a.m.