Skip to contents

Helper functions for converting between symbols and names associated with hydric indicators, their names, and Land Resource Regions (LRR) or Major Land Resource Areas (MLRA) using the internal dataset lrrmlra.

Usage

indicator_to_name(x)

name_to_indicator(x)

indicator_to_usesym(x, simplify = TRUE)

usesym_match(x)

usesym_to_indicator(x, simplify = TRUE)

fihs_match(x, a)

Arguments

x

character. Vector of indicator codes or names.

simplify

logical. If result is a list, and x is length 1, return a character vector. Default: TRUE

a

character. Used only for fihs_match(). Column name in fihs to match x against.

Value

character or list. Vector of indicator codes or names corresponding to x.

References

United States Department of Agriculture, Natural Resources Conservation Service. 2018. Field Indicators of Hydric Soils in the United States, Version 8.2. L.M. Vasilas, G.W. Hurt, and J.F. Berkowitz (eds.). USDA, NRCS, in cooperation with the National Technical Committee for Hydric Soils. Available online: https://www.nrcs.usda.gov/resources/guides-and-instructions/field-indicators-of-hydric-soils

United States Department of Agriculture, Natural Resources Conservation Service. 2022. Land resource regions and major land resource areas of the United States, the Caribbean, and the Pacific Basin. U.S. Department of Agriculture, Agriculture Handbook 296. Available online: https://www.nrcs.usda.gov/resources/data-and-reports/major-land-resource-area-mlra

See also

Examples


indicator_to_name(c("A11", "A10", NA, "F1", "A8"))
#> [1] "Depleted Below Dark Surface" "2 cm Muck"                  
#> [3] NA                            "Loamy Mucky Mineral"        
#> [5] "Muck Presence"              

name_to_indicator(c("Depleted Below Dark Surface", "2 cm Muck", NA, "Loamy Mucky Mineral", "Muck Presence"))
#> [1] "A11" "A10" NA    "F1"  "A8" 

indicator_to_usesym(c("A11", "A10", NA, "F1", "A8"))
#> $A11
#>  [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S"
#> [20] "T" "U" "V" "Z"
#> 
#> $A10
#> [1] "M" "N"
#> 
#> $<NA>
#> NULL
#> 
#> $F1
#>  [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "O"
#> 
#> $A8
#> [1] "Q" "U" "V" "Z"
#> 

usesym_to_indicator(c("22A", "150A"))
#> $`22A`
#>  [1] "A1"  "A2"  "A3"  "A4"  "A9"  "A11" "A12" "S1"  "S4"  "S5"  "S6"  "F1" 
#> [13] "F2"  "F3"  "F6"  "F7"  "F8" 
#> 
#> $`150A`
#>  [1] "A1"  "A2"  "A3"  "A4"  "A5"  "A6"  "A7"  "A9"  "A11" "A12" "A16" "S4" 
#> [13] "S5"  "S6"  "S7"  "S8"  "S9"  "F2"  "F3"  "F6"  "F7"  "F8"  "F13" "F18"
#>