Skip to content

Commit

Permalink
Merge pull request #44 from AgroCares/pandex_checks
Browse files Browse the repository at this point in the history
Pandex checks
  • Loading branch information
gerardhros authored Aug 16, 2022
2 parents 1495587 + a4be51d commit 391efd7
Show file tree
Hide file tree
Showing 19 changed files with 207 additions and 92 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: BBWPC
Type: Package
Title: Calculator for BedrijfsBodemWaterPlan (BBWP)
Version: 0.9.0
Version: 0.9.1
Authors@R: c(
person("Gerard", "Ros", email = "[email protected]", role = c("aut","cre")),
person("Sven", "Verweij", email = "[email protected]", role = c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# BBWPC v0.9.1
## Added
* Added table with BBWPC variable from pandex to standardise parameter checks

# BBWPC v0.9.0
## Changed
* delete `B_LU_ECO_x` as input of `er_main`, `er_meas_rank`, `er_meas_scores`, and `er_field_score`.
Expand Down
8 changes: 7 additions & 1 deletion R/bbwp_farm_score.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
# calculate the opportunities for a set of fields
bbwp_farm_score <- function(S_BBWP_TOT,S_BBWP_NGW,S_BBWP_NSW,S_BBWP_PSW,S_BBWP_NUE,S_BBWP_WB, B_AREA){

code = value_min = value_max = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms

# check length of the inputs
arg.length <- max(length(S_BBWP_TOT),length(S_BBWP_NGW),length(S_BBWP_NSW),length(S_BBWP_PSW),
length(S_BBWP_NUE),length(S_BBWP_WB),length(B_AREA))
Expand All @@ -27,7 +32,8 @@ bbwp_farm_score <- function(S_BBWP_TOT,S_BBWP_NGW,S_BBWP_NSW,S_BBWP_PSW,S_BBWP_N
checkmate::assert_numeric(S_BBWP_PSW, lower = 0, upper = 100, len = arg.length)
checkmate::assert_numeric(S_BBWP_NUE, lower = 0, upper = 100, len = arg.length)
checkmate::assert_numeric(S_BBWP_WB, lower = 0, upper = 100, len = arg.length)
checkmate::assert_numeric(B_AREA, lower = 0, upper = 500000000, len = arg.length)
checkmate::assert_numeric(B_AREA, lower = bbwp_parms[code == "B_AREA", value_min], upper = bbwp_parms[code == "B_AREA", value_max], len = arg.length)


# collect data in one data.table
dt <- data.table(id = 1:arg.length,
Expand Down
39 changes: 20 additions & 19 deletions R/bbwp_field_properties.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ bbwp_field_properties <- function(B_SOILTYPE_AGR, B_LU_BBWP, B_GWL_CLASS, B_SC_W
mean_n_rt = sd_n_rt = sd_ro_r = sd_sa_w = sd_p_cc = mean_p_sg = mean_al_ox = NULL
mean_fe_ox = sd_fe_ox = crop_category = B_GT = mean_ro_r = mean_sa_w = mean_p_cc = psw_psg = sd_p_sg = NULL
sd_al_ox = id = NULL
code = value_min = value_max = choices = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms

# check length inputs
arg.length <- max(
Expand All @@ -58,31 +62,28 @@ bbwp_field_properties <- function(B_SOILTYPE_AGR, B_LU_BBWP, B_GWL_CLASS, B_SC_W
B_AER_CBS <- bbwp_format_aer(B_AER_CBS)

# check inputs B parameters
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unique(OBIC::soils.obic$soiltype))
checkmate::assert_subset(B_SC_WENR, choices = c(3, 4, 1, 401, 902, 2, 901, 5, 11, 10))
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unlist(bbwp_parms[code == "B_SOILTYPE_AGR", choices]))
checkmate::assert_subset(B_SC_WENR, choices = unlist(bbwp_parms[code == "B_SC_WENR", choices]))
checkmate::assert_subset(B_HELP_WENR, choices = c(unique(OBIC::waterstress.obic$soilunit), "unknown"), empty.ok = FALSE)
checkmate::assert_numeric(B_SLOPE_DEGREE, lower = 0, upper = 30, any.missing = FALSE, len = arg.length)
checkmate::assert_subset(B_LU_BBWP,
choices = c('groenten','bollensierteelt','boomfruitteelt','rustgewas','eiwitgewas',
'rooivrucht','mais','gras_permanent','gras_tijdelijk','natuur',
'randensloot','vanggewas'))
checkmate::assert_numeric(B_SLOPE_DEGREE, lower = bbwp_parms[code == "B_SLOPE_DEGREE", value_min], upper = bbwp_parms[code == "B_SLOPE_DEGREE", value_max],len = arg.length)
checkmate::assert_subset(B_LU_BBWP, choices = unlist(bbwp_parms[code == "B_LU_BBWP", choices]))
checkmate::assert_character(B_LU_BBWP, len = arg.length)
# check inputs A parameters
checkmate::assert_numeric(A_CLAY_MI, lower = 0, upper = 100, any.missing = FALSE,len = arg.length)
checkmate::assert_numeric(A_SAND_MI, lower = 0, upper = 100, any.missing = FALSE,len = arg.length)
checkmate::assert_numeric(A_SILT_MI, lower = 0, upper = 100, any.missing = FALSE,len = arg.length)
checkmate::assert_numeric(A_SOM_LOI, lower = 0, upper = 100, any.missing = FALSE,len = arg.length)
checkmate::assert_numeric(A_N_RT, lower = 0, upper = 100000, any.missing = FALSE,len = arg.length)
checkmate::assert_numeric(A_AL_OX, lower = 0, upper = 1000, any.missing = FALSE, len = arg.length)
checkmate::assert_numeric(A_FE_OX, lower = 0, upper = 1000, any.missing = FALSE, len = arg.length)
checkmate::assert_numeric(A_P_SG, lower = 0, upper = 100, any.missing = FALSE, len = arg.length)
checkmate::assert_numeric(A_P_CC, lower = 0, upper = 50, any.missing = FALSE, len = arg.length)
checkmate::assert_numeric(A_P_AL, lower = 0, upper = 200, any.missing = FALSE, len = arg.length)
checkmate::assert_numeric(A_P_WA, lower = 0, upper = 200, any.missing = FALSE, len = arg.length)
checkmate::assert_numeric(A_CLAY_MI, lower = bbwp_parms[code == "A_CLAY_MI", value_min], upper = bbwp_parms[code == "A_CLAY_MI", value_max],len = arg.length)
checkmate::assert_numeric(A_SAND_MI, lower = bbwp_parms[code == "A_SAND_MI", value_min], upper = bbwp_parms[code == "A_SAND_MI", value_max],len = arg.length)
checkmate::assert_numeric(A_SILT_MI, lower = bbwp_parms[code == "A_SILT_MI", value_min], upper = bbwp_parms[code == "A_SILT_MI", value_max],len = arg.length)
checkmate::assert_numeric(A_SOM_LOI, lower = bbwp_parms[code == "A_SOM_LOI", value_min], upper = bbwp_parms[code == "A_SOM_LOI", value_max],len = arg.length)
checkmate::assert_numeric(A_N_RT, lower = bbwp_parms[code == "A_N_RT", value_min], upper = bbwp_parms[code == "A_N_RT", value_max],len = arg.length)
checkmate::assert_numeric(A_AL_OX, lower = bbwp_parms[code == "A_AL_OX", value_min], upper = bbwp_parms[code == "A_AL_OX", value_max],len = arg.length)
checkmate::assert_numeric(A_FE_OX, lower = bbwp_parms[code == "A_FE_OX", value_min], upper = bbwp_parms[code == "A_FE_OX", value_max],len = arg.length)
checkmate::assert_numeric(A_P_SG, lower = bbwp_parms[code == "A_P_SG", value_min], upper = bbwp_parms[code == "A_P_SG", value_max],len = arg.length)
checkmate::assert_numeric(A_P_CC, lower = bbwp_parms[code == "A_P_CC", value_min], upper = bbwp_parms[code == "A_P_CC", value_max],len = arg.length)
checkmate::assert_numeric(A_P_AL, lower = bbwp_parms[code == "A_P_AL", value_min], upper = bbwp_parms[code == "A_P_AL", value_max],len = arg.length)
checkmate::assert_numeric(A_P_WA, lower = bbwp_parms[code == "A_P_WA", value_min], upper = bbwp_parms[code == "A_P_WA", value_max],len = arg.length)

# check inputs D parameters
checkmate::assert_numeric(D_SA_W, lower = 0, upper = 1, len = arg.length)
checkmate::assert_numeric(D_RO_R, lower = 0, upper = 1, len = arg.length)
checkmate::assert_numeric(D_RO_R, lower = bbwp_parms[code == "D_RO_R", value_min], upper = bbwp_parms[code == "D_RO_R", value_max],len = arg.length)

# check lsw and replace based on location if lsw is not provided
LSW.dt = bbwp_check_lsw(LSW = LSW, a_lat = a_lat, a_lon = a_lon)
Expand Down
17 changes: 9 additions & 8 deletions R/bbwp_field_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ bbwp_field_scores <- function(B_SOILTYPE_AGR, B_GWL_CLASS, A_P_SG, B_SLOPE_DEGRE
D_OPI_NGW = D_OPI_NSW = D_OPI_PSW = D_OPI_NUE = D_OPI_WB = NULL
D_MEAS_NGW = D_MEAS_NSW = D_MEAS_PSW = D_MEAS_NUE = D_OPI_TOT = NULL
D_MEAS_WB = D_MES_PSW = D_MEAS_NGW = D_MEAS_PSW = effect_Wb = id = NULL
code = value_min = value_max = choices = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms


# check length of the inputs
arg.length <- max(length(B_SOILTYPE_AGR),length(B_GWL_CLASS), length(A_P_SG),length(B_AER_CBS),
Expand All @@ -48,15 +53,11 @@ bbwp_field_scores <- function(B_SOILTYPE_AGR, B_GWL_CLASS, A_P_SG, B_SLOPE_DEGRE
length(B_CT_NSW))

# check inputs
checkmate::assert_subset(B_SOILTYPE_AGR, choices = c('duinzand','dekzand','zeeklei','rivierklei','maasklei',
'dalgrond','moerige_klei','veen','loess'))
checkmate::assert_numeric(A_P_SG, lower = 0, upper = 120, len = arg.length)
checkmate::assert_numeric(B_SLOPE_DEGREE, lower = 0, upper = 30,len = arg.length)
checkmate::assert_subset(B_LU_BBWP,
choices = c('groenten','bollensierteelt','boomfruitteelt','rustgewas','eiwitgewas',
'rooivrucht','mais','gras_permanent','gras_tijdelijk','natuur',
'randensloot','vanggewas'))
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unlist(bbwp_parms[code == "B_SOILTYPE_AGR", choices]))
checkmate::assert_subset(B_LU_BBWP, choices = unlist(bbwp_parms[code == "B_LU_BBWP", choices]))
checkmate::assert_character(B_LU_BBWP, len = arg.length)
checkmate::assert_numeric(A_P_SG, lower = bbwp_parms[code == "A_P_SG", value_min], upper = bbwp_parms[code == "A_P_SG", value_max],len = arg.length)
checkmate::assert_numeric(B_SLOPE_DEGREE,lower = bbwp_parms[code == "B_SLOPE_DEGREE", value_min], upper = bbwp_parms[code == "B_SLOPE_DEGREE", value_max],len = arg.length)
checkmate::assert_logical(M_DRAIN,len = arg.length)
checkmate::assert_numeric(D_SA_W, lower = 0, upper = 1, len = arg.length)
checkmate::assert_numeric(D_RISK_NGW, lower = 0, upper = 1, len = arg.length)
Expand Down
17 changes: 8 additions & 9 deletions R/bbwp_meas_rank.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ bbwp_meas_rank <- function(B_SOILTYPE_AGR, B_GWL_CLASS, A_P_SG, B_SLOPE_DEGREE,
fsector = fdairy = dairy = farable = arable = ftree_nursery = tree_nursery = fbulbs = bulbs = NULL
bbwp_id = oid = level = NULL
nc1 = nc2 = nc3 = nc4 = nc5 = nc6 = nc7 = nc8 = nc9 = nc10 = nc11 = nc12 = NULL
code = value_min = value_max = choices = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms

# check length of the inputs
arg.length <- max(length(D_OPI_NGW), length(D_OPI_NSW), length(D_OPI_PSW), length(D_OPI_NUE),
Expand All @@ -47,17 +51,12 @@ bbwp_meas_rank <- function(B_SOILTYPE_AGR, B_GWL_CLASS, A_P_SG, B_SLOPE_DEGREE,
B_AER_CBS <- bbwp_format_aer(B_AER_CBS)

# check inputs
checkmate::assert_subset(B_SOILTYPE_AGR,
choices = c('duinzand','dekzand','zeeklei','rivierklei','maasklei',
'dalgrond','moerige_klei','veen','loess'))
checkmate::assert_subset(B_LU_BBWP,
choices = c('groenten','bollensierteelt','boomfruitteelt','rustgewas','eiwitgewas',
'rooivrucht','mais','gras_permanent','gras_tijdelijk','natuur',
'randensloot','vanggewas'))
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unlist(bbwp_parms[code == "B_SOILTYPE_AGR", choices]))
checkmate::assert_subset(B_LU_BBWP, choices = unlist(bbwp_parms[code == "B_LU_BBWP", choices]))
checkmate::assert_character(B_LU_BBWP, len = arg.length)
checkmate::assert_logical(M_DRAIN)
checkmate::assert_numeric(A_P_SG, lower = 0, upper = 120,len = arg.length)
checkmate::assert_numeric(B_SLOPE_DEGREE,lower = 0, upper = 30,len = arg.length)
checkmate::assert_numeric(A_P_SG, lower = bbwp_parms[code == "A_P_SG", value_min], upper = bbwp_parms[code == "A_P_SG", value_max],len = arg.length)
checkmate::assert_numeric(B_SLOPE_DEGREE,lower = bbwp_parms[code == "B_SLOPE_DEGREE", value_min], upper = bbwp_parms[code == "B_SLOPE_DEGREE", value_max],len = arg.length)
checkmate::assert_numeric(D_SA_W, lower = 0, upper = 100,len = arg.length)
checkmate::assert_numeric(D_OPI_NGW, lower = 0, upper = 100,len = arg.length)
checkmate::assert_numeric(D_OPI_NSW, lower = 0, upper = 100,len = arg.length)
Expand Down
18 changes: 9 additions & 9 deletions R/bbwp_meas_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ bbwp_meas_score <- function(B_SOILTYPE_AGR, B_GWL_CLASS, A_P_SG, B_SLOPE_DEGREE
nc1 = nc2 = nc3 = nc4 = nc5 = nc6 = nc7 = nc8 = nc9 = nc10 = nc11 = nc12 = NULL
fsector = fdairy = dairy = farable = arable = ftree_nursery = tree_nursery = fbulbs = bulbs = NULL
oid = NULL
code = value_min = value_max = choices = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms

# check length of the inputs
arg.length <- max(length(D_OPI_NGW), length(D_OPI_NSW), length(D_OPI_PSW), length(D_OPI_NUE),
Expand All @@ -47,17 +51,13 @@ bbwp_meas_score <- function(B_SOILTYPE_AGR, B_GWL_CLASS, A_P_SG, B_SLOPE_DEGREE
B_AER_CBS <- bbwp_format_aer(B_AER_CBS)

# check inputs
checkmate::assert_subset(B_SOILTYPE_AGR, choices = c('duinzand','dekzand','zeeklei','rivierklei','maasklei',
'dalgrond','moerige_klei','veen','loess'))
checkmate::assert_subset(B_GWL_CLASS, choices = c('-', 'GtI','GtII','GtII','GtIII','GtIII','GtIV', 'GtV','GtVI','GtVII','GtVIII'))
checkmate::assert_subset(B_LU_BBWP,
choices = c('groenten','bollensierteelt','boomfruitteelt','rustgewas','eiwitgewas',
'rooivrucht','mais','gras_permanent','gras_tijdelijk','natuur',
'randensloot','vanggewas'))
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unlist(bbwp_parms[code == "B_SOILTYPE_AGR", choices]))
checkmate::assert_subset(B_GWL_CLASS, choices = unlist(bbwp_parms[code == "B_GWL_CLASS", choices]))
checkmate::assert_subset(B_LU_BBWP, choices = unlist(bbwp_parms[code == "B_LU_BBWP", choices]))
checkmate::assert_character(B_LU_BBWP, len = arg.length)
checkmate::assert_logical(M_DRAIN,len = arg.length)
checkmate::assert_numeric(A_P_SG, lower = 0, upper = 120, len = arg.length)
checkmate::assert_numeric(B_SLOPE_DEGREE, lower=0, upper = 30,len = arg.length)
checkmate::assert_numeric(A_P_SG, lower = bbwp_parms[code == "A_P_SG", value_min], upper = bbwp_parms[code == "A_P_SG", value_max],len = arg.length)
checkmate::assert_numeric(B_SLOPE_DEGREE, lower = bbwp_parms[code == "B_SLOPE_DEGREE", value_min], upper = bbwp_parms[code == "B_SLOPE_DEGREE", value_max],len = arg.length)
checkmate::assert_numeric(D_SA_W, lower = 0, upper = 1, len = arg.length)
checkmate::assert_numeric(D_OPI_NGW, lower = 0, upper = 1, len = arg.length)
checkmate::assert_numeric(D_OPI_NSW, lower = 0, upper = 1, len = arg.length)
Expand Down
29 changes: 28 additions & 1 deletion R/bbwp_tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,31 @@
#' \item{statname}{The name of the Agricultural Economic Region}
#' \item{er_cf}{The value of the correction factor for the financial reward differentiated per Agricutural Economic Region}
#' }
"er_aer_reward"
"er_aer_reward"


#' A table with the BBWP parameters
#'
#' This table contains the BBWP variables and their possible values according to pandex to standardize checks
#'
#' @format A data.table with 21 rows and 14 columns:
#' \describe{
#' \item{code}{The parameter code}
#' \item{parameter}{Brief description of the parameter}
#' \item{unit}{The unit of the parameter if applicable}
#' \item{product}{Data classifier, A = Soil measurements, B = Environmental characteristics,
#' D = Soil or feed characteristics derived from soil/feed measurements,
#' M = Soil management measures, S = Scores, RM = Recommendations (measures/gifts),
#' I = Indicators, F = Feed measurements, P = soil amendment product}
#' \item{element}{Indicates the chemical element or parameter name}
#' \item{method1}{Method used to determine value}
#' \item{method2}{Additional details on method}
#' \item{data_type}{Type of data the parameter pertains to: numeric, integer, char, bool, geom, enum}
#' \item{value_min}{Lowest possible value the parameter may have if numeric or integer}
#' \item{value_max}{Highest possible value the parameter may have if numeric or integer}
#' \item{explanation}{Some additional explanation}
#' \item{enum}{boolean whether parameter values are drawn from a limited set}
#' \item{options}{Allowed values for a parameter of type enum seperated by "||"}
#' \item{choices}{Vectorized version of options}
#' }
"bbwp_parms"
23 changes: 12 additions & 11 deletions R/er_croprotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ er_croprotation <- function(B_SOILTYPE_AGR, B_AER_CBS,B_AREA,
fr_soil = er_reward = fr_soil = reward_cf = regio_factor = euro_ha = oid = water = soil = climate = biodiversity = landscape = climate = total = NULL
er_total = er_climate = er_soil = er_water = er_landscape = er_biodiversity = NULL
eco_app = b_lu_arable_er = b_lu_productive_er = b_lu_cultivated_er = NULL
code = choices = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms

# reformat B_AER_CBS
B_AER_CBS <- bbwp_format_aer(B_AER_CBS)
Expand All @@ -47,22 +51,19 @@ er_croprotation <- function(B_SOILTYPE_AGR, B_AER_CBS,B_AREA,
length(B_LU_ARABLE_ER),length(B_LU_PRODUCTIVE_ER),length(B_LU_CULTIVATED_ER))

# check inputs
checkmate::assert_subset(B_SOILTYPE_AGR, choices = c('duinzand','dekzand','zeeklei','rivierklei','maasklei',
'dalgrond','moerige_klei','veen','loess'))
checkmate::assert_subset(B_LU_BBWP,
choices = c('groenten','bollensierteelt','boomfruitteelt','rustgewas','eiwitgewas',
'rooivrucht','mais','gras_permanent','gras_tijdelijk','natuur',
'randensloot','vanggewas'))
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unlist(bbwp_parms[code == "B_SOILTYPE_AGR", choices]))
checkmate::assert_subset(B_LU_BBWP, choices = unlist(bbwp_parms[code == "B_LU_BBWP", choices]))
checkmate::assert_character(B_LU_BBWP, len = arg.length)
checkmate::assert_subset(B_LU_BRP, choices = unlist(bbwp_parms[code == "B_LU_BRP", choices]))
checkmate::assert_integerish(B_LU_BRP, len = arg.length)
checkmate::assert_numeric(B_CT_SOIL, lower = 0, upper = 1000, min.len = 1)
checkmate::assert_numeric(B_CT_WATER, lower = 0, upper = 1000, min.len = 1)
checkmate::assert_numeric(B_CT_CLIMATE, lower = 0, upper = 1000,min.len = 1)
checkmate::assert_numeric(B_CT_BIO, lower = 0, upper = 1000, min.len = 1)
checkmate::assert_numeric(B_CT_LANDSCAPE, lower = 0, upper = 1000,min.len = 1)
checkmate::assert_logical(B_LU_ARABLE_ER,len = arg.length)
checkmate::assert_logical(B_LU_PRODUCTIVE_ER,len = arg.length)
checkmate::assert_logical(B_LU_CULTIVATED_ER,len = arg.length)
checkmate::assert_numeric(B_CT_SOIL, lower = 0, min.len = 1)
checkmate::assert_numeric(B_CT_WATER, lower = 0, min.len = 1)
checkmate::assert_numeric(B_CT_CLIMATE, lower = 0, min.len = 1)
checkmate::assert_numeric(B_CT_BIO, lower = 0, min.len = 1)
checkmate::assert_numeric(B_CT_LANDSCAPE, lower = 0, min.len = 1)

# check and update the measure table
dt.meas.farm <- bbwp_check_meas(dt = measures, eco = TRUE, score = TRUE)
Expand Down
9 changes: 6 additions & 3 deletions R/er_farm_aim.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ er_farm_aim <- function(B_SOILTYPE_AGR, B_AREA, medalscore = "gold", farmscore =

# add visual bindings
. = type = soiltype = value.mis = value = farmid = NULL
code = value_min = value_max = choices = NULL

# Load bbwp_parms
bbwp_parms <- BBWPC::bbwp_parms

# check length of the inputs
arg.length <- max(length(B_SOILTYPE_AGR),length(B_AREA))

# check inputs
checkmate::assert_numeric(B_AREA, lower = 0, upper = 500000000)
checkmate::assert_subset(B_SOILTYPE_AGR, choices = c('duinzand','dekzand','zeeklei','rivierklei','maasklei',
'dalgrond','moerige_klei','veen','loess'))
checkmate::assert_numeric(B_AREA, lower = bbwp_parms[code == "B_AREA", value_min], upper = bbwp_parms[code == "B_AREA", value_max], len = arg.length)
checkmate::assert_subset(B_SOILTYPE_AGR, choices = unlist(bbwp_parms[code == "B_SOILTYPE_AGR", choices]))
checkmate::assert_subset(medalscore, choices = c('bronze','silver','gold'))

# get internal table for minimum scores on farm level
Expand Down
Loading

0 comments on commit 391efd7

Please sign in to comment.