demand_nutrient: Compute NPK fertilization

Description Usage Arguments Details Value See Also Examples

View source: R/demand_nutrient.R

Description

This is the main interface hub to all fertplan package functions. Its main objective is to relieve the user from the process of computing all NPK flow components (i.e. $f_N,a-f_N,g$ for nitrogen) that make each nutrient budget.

Usage

1
demand_nutrient(soil_dt, vars, nutrient = "all", blnc_cmpt = FALSE)

Arguments

soil_dt

a data.table of soil properties (columns) x soil samples (rows). The specific features (soil analyses) that must be passed in the data.table depend on the nutrient fertilization passed in nutrient parameter

vars

a list of variables shared between all soil samples. The specific variables needed depend on the nutrient fertilization passed in nutrient parameter

nutrient

a character vector detailing which nutrient fertilization plan to compute among "nitrogen", "phosphorus", and "potassium". Any combination of the three nutrients can be given or "all" (default) to compute all of them.

blnc_cmpt

should the individual components of the nutrient balance or just the nutrient balance itself be returned? Default to return nutrient balance.

Details

To compure NPK fertilization plans soil, a few chemical and physical analysis on soil samples are needed as well as some informations on the environment and related to the crop to be sown.

All soil samples chemical and physical analyses (i.e. for nitrogen nutrien: percentage of nitrogen, carbon / nitrogen ratio, organic matter percentage, clay content in percentage) needed to compute each nutrient budget must be passed as data.table columns and soil samples as rows, as in the following example for nitrogen:

N_pc CNR SOM_pc Clay_pc
0.139 9.57 2.30 34
0.165 9.82 2.79 37
0.160 9.75 2.69 40

The order of the features/columns is unimportant. An example of features needed for Phosphorus nutrient:

P_ppm Limestone_pc
11 17.4
14 9.5
14 12.2

An example of features needed for Potassium nutrient:

K_ppm Clay_pc
449 34
359 37
398 40

Other environmental and crop-related informazions needed for each nutrient computation can be passed as elements of a list. The function assumes that these features are shared among all soil samples. Specific informations on these variables can be found on the nitrogen, phosphorus, and potassium vignettes and on the Lazio Region guidelines.

Environmental features needed for nitrogen nutrient:

Environmental features needed for phosphorus nutrient:

Environmental features needed for potassium nutrient:

A real soil samples data.table is available as package dataset soils.

More informations on soil properties and other variables related to the crop and the environment can be found in the documentation of the check_soil_table() and check_vars() functions, in package vignettes and in the guideline of Region Lazio.

Value

a data.table with as many rows as soil samples given as soil_dt argument. When blnc_cmpt is set to FALSE, the data.table will feature the nutrient balances given as nutrient argument. Otherwise it will feature the as many balance components as each nutrients foresees.

See Also

Assessorato Agricoltura, Promozione della Filiera e della Cultura del Cibo, Ambiente e Risorse Naturali. 2020. “Parte Agronomica, Norme Generali, Disciplinare Di Produzione Integrata Della Regione Lazio - SQNPI.” Regione Lazio. http://www.regione.lazio.it/rl_agricoltura/?vw=documentazioneDettaglio&id=52065.

Examples

1
2
3
4
5
6
7
8
soil_vars <- list(
crop                 = "Girasole",
part                 = "Seme",
expected_yield_kg_ha = 1330L,
texture              = "Franco",
soil_depth_cm        = 30L)
data(soils)
nutrient_dt <- demand_nutrient(soils, soil_vars, nutrient = "potassium")

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