check_soil_table: Performs sanity checks on soil table

Description Usage Arguments Details Value Examples

View source: R/checks.R

Description

The computation of nutrient fertilization plans requires a few soil analyses be performed. Each nutrient fertilization plan requires specific analyses, the functions checks whether these analyses results are present in soil table for each specific nutrient.

Usage

1
check_soil_table(soil_dt, nutrient)

Arguments

soil_dt

A table where soil physical and chemical features needed are given or NULL

nutrient

One of "nitrogen", "phosphorus", "potassium"

Details

The data object are passed to appropriate fertplan functions by demand_nutrient(), further information on soil features, and their unit of measure can be found in help pages and vignettes of the fertplan package. Templates for soil tables:

Template for nitrogen nutrient table:

Template for phosphorus nutrient table:

templates for potassium nutrient table:

Note that the appropriate classes of soil features for each specific nutrient may be looked up by passing NULL as soil_dt argument, like in check_soil_table(NULL, "potassium").

Value

A subset of the soil table featuring only the specific analyses results for the nutrient given or, if soil_dt is NULL a character vector of classes of the relevant soil features for each specific nutrient.

Examples

1
check_soil_table(NULL, "potassium")

mbask/fertplan documentation built on July 3, 2020, 12:01 p.m.