get_classes: Get all soil classes

View source: R/dsmartr_iterate.R

get_classesR Documentation

Get all soil classes

Description

Returns the set of unique soil classes that occur in an input soil map, and, optionally, a set of known points.

Usage

get_classes(soil_map = NULL, soil_points = NULL, col_stub = NULL)

Arguments

col_stub

String; stub of attribute column names holding soil class data

soilmap

Data Frame; Returned by prep_polygons.

soilpoints

Data Frame; Returned by prep_points; optional.

Value

A factor holding the set of soil classes occurring in both datasets, sorted alphabetically. Internal to iterate.

Note

It is up to the user to make sure the classification schema in both datasets matches/is compatible.

Examples

## Not run: 
# run prep_polygons() and prep_points() examples, then:
class_levels <- get_classes(soil_map = pr_ap, soil_points = pr_pts, col_stub
= 'CLASS')
## End(Not run)

obrl-soil/dsmartr documentation built on Feb. 1, 2024, 10:57 p.m.