Skip to contents

Lookup Soil Texture Abbreviation Codes or Names

Usage

lookupTexture(x, what = "names", dsn = NULL)

lookupTextureModifier(x, what = "names", dsn = NULL)

Arguments

x

a vector of soil texture/texture modifier abbreviation codes or names

what

either "names" (default) or "codes". The opposite of what x is.

dsn

passed to get_NASIS_metadata()

Value

a vector of soil texture abbreviation codes or names depending on whether input values are matched in the lookup table and the value of what. Unmatched values in x return NA.

Examples

x <- lookupTexture(c("loam", "bar", "sandy loam"), what = "codes")
x
#> [1] "l"  NA   "sl"
lookupTexture(x, what = "names")
#> [1] "Loam"       NA           "Sandy loam"

lookupTextureModifier("extremely bouldery")
#> [1] NA