texture_to_code: Convert NRCS texture classes/modifiers to codes

View source: R/texture_to_code.R

texmod_to_codeR Documentation

Convert NRCS texture classes/modifiers to codes

Description

Replace NRCS textures or texture modifiers with codes.

Usage

texmod_to_code(tex, keep_unrecognized = F)

texture_to_code(tex, keep_unrecognized = F)

Arguments

tex

Vector of character strings

keep_unrecognized

True/False, default to False. If True, unrecognized strings will be retained. If False, unrecognized entries will be replaced with NA_character.

Value

A vector of the original length with identified entries changed to codes.

Examples

texture_strings <- c("sandy loam", "CLAY", "lerm")
texmod_strings <- c("gravelly", "STONY", "wet")

texture_to_code(texture_strings)
texture_to_code(texture_strings, keep_unrecognized = T)

texmod_to_code(texmod_strings)
texmod_to_code(texmod_strings, keep_unrecognized = T)

Landscape-Data-Commons/terradactyl-utils documentation built on Nov. 19, 2024, 5:20 p.m.