Parse components of a family-level taxon name

parse_family(family)

Arguments

family

a character vector containing taxonomic families, e.g. "fine-loamy, mixed, semiactive, mesic ultic haploxeralfs"

Value

a data.frame containing column names: "family" (input), "subgroup" (parsed taxonomic subgroup), "subgroup_code" (letter code for subgroup), "class_string" (comma-separated family classes), "classes_split" (split class_string vector stored as list column)

Examples

families <- c("fine, kaolinitic, thermic typic kanhapludults", "fine-loamy, mixed, semiactive, mesic ultic haploxeralfs", "euic, thermic typic haplosaprists", "coarse-loamy, mixed, active, mesic aquic dystrudepts", "fine, kaolinitic, thermic typic kanhapludults", "fine-loamy, mixed, semiactive, mesic ultic haploxeralfs", "euic, thermic typic haplosaprists", "coarse-loamy, mixed, active, mesic aquic dystrudepts") # inspect parsed list result str(parse_family(families))
#> 'data.frame': 8 obs. of 5 variables: #> $ family : chr "fine, kaolinitic, thermic typic kanhapludults" "fine-loamy, mixed, semiactive, mesic ultic haploxeralfs" "euic, thermic typic haplosaprists" "coarse-loamy, mixed, active, mesic aquic dystrudepts" ... #> $ subgroup : chr "typic kanhapludults" "ultic haploxeralfs" "typic haplosaprists" "aquic dystrudepts" ... #> $ subgroup_code: chr "HCDN" "JDGR" "BDDH" "KFFK" ... #> $ class_string : chr "fine, kaolinitic, thermic" "fine-loamy, mixed, semiactive, mesic" "euic, thermic" "coarse-loamy, mixed, active, mesic" ... #> $ classes_split:List of 8 #> ..$ : chr "fine" "kaolinitic" "thermic" #> ..$ : chr "fine-loamy" "mixed" "semiactive" "mesic" #> ..$ : chr "euic" "thermic" #> ..$ : chr "coarse-loamy" "mixed" "active" "mesic" #> ..$ : chr "fine" "kaolinitic" "thermic" #> ..$ : chr "fine-loamy" "mixed" "semiactive" "mesic" #> ..$ : chr "euic" "thermic" #> ..$ : chr "coarse-loamy" "mixed" "active" "mesic" #> ..- attr(*, "class")= chr "AsIs"