Clean and categorize lithology descriptions into primary, secondary, tertiary and final lithology categories. Generally this function is used internally when loading and cleaning GWELLS lithology.
Details
However statements can be tested directly with this function to see how it works and for troubleshooting.
Examples
lith_fix(desc = "sandy gravel")
#> lithology_raw_data lithology_clean lith_primary lith_secondary lith_tertiary
#> 1 sandy gravel sandy gravel gravel sand
#> lithology_extra lithology_category yield_units flag_bedrock
#> 1 Sand and Gravel (Clean) FALSE
#> flag_boulders flag_missing_cats
#> 1 FALSE FALSE
# basic spell checks
lith_fix(desc = "saandy gravel")
#> lithology_raw_data lithology_clean lith_primary lith_secondary lith_tertiary
#> 1 saandy gravel sandy gravel gravel sand
#> lithology_extra lithology_category yield_units flag_bedrock
#> 1 Sand and Gravel (Clean) FALSE
#> flag_boulders flag_missing_cats
#> 1 FALSE FALSE