You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Groundwater class (B_GWL_CLASS) passed to calc_waterstressindex is updated to more generic ones within the function before checks are performed. # update B_GWL_CLASS to more generic ones B_GWL_CLASS.wi <- gsub("b$","", B_GWL_CLASS)
A check is performed on B_GWL_CLASS instead of the more generic B_GWL_CLASS.wi : checkmate::assert_subset(B_GWL_CLASS, choices = c('-',unique(waterstress.obic$gt)), empty.ok = FALSE)
While B_GWL_CLASS.wi is actually used in the function: # Collect data in a table dt <- data.table( id = 1:arg.length, B_HELP_WENR = B_HELP_WENR, B_LU_BRP = B_LU_BRP, B_GWL_CLASS = B_GWL_CLASS.wi )
The result is that passing a valid gwl class such as "GtIIb" results in an error
Either the check on B_GWL_CLASS must be extended with more options or the check should be replaced with a check on B_GWL_CLASS.wi.
The text was updated successfully, but these errors were encountered:
Groundwater class (B_GWL_CLASS) passed to calc_waterstressindex is updated to more generic ones within the function before checks are performed.
# update B_GWL_CLASS to more generic ones B_GWL_CLASS.wi <- gsub("b$","", B_GWL_CLASS)
A check is performed on B_GWL_CLASS instead of the more generic B_GWL_CLASS.wi :
checkmate::assert_subset(B_GWL_CLASS, choices = c('-',unique(waterstress.obic$gt)), empty.ok = FALSE)
While B_GWL_CLASS.wi is actually used in the function:
# Collect data in a table dt <- data.table( id = 1:arg.length, B_HELP_WENR = B_HELP_WENR, B_LU_BRP = B_LU_BRP, B_GWL_CLASS = B_GWL_CLASS.wi )
The result is that passing a valid gwl class such as "GtIIb" results in an error
Either the check on B_GWL_CLASS must be extended with more options or the check should be replaced with a check on B_GWL_CLASS.wi.
The text was updated successfully, but these errors were encountered: