Commit 77fa9c32 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

refactor: check the QupstrUnit argument using match.arg in CreateInputsModel

Refs #110
Showing with 1 addition and 3 deletions
+1 -3
......@@ -216,9 +216,7 @@ CreateInputsModel <- function(FUN_MOD,
if(any(LengthHydro > 1000)) {
warning("The unit of 'LengthHydro' has changed from m to km in v1.7 of airGR: values superior to 1000 km seem unrealistic")
}
if (!(QupstrUnit %in% c("mm", "m3", "m3/s", "l/s", "L/s"))) {
stop("'QupstrUnit' must be one of these values: 'mm', 'm3', 'm3/s', 'L/s' or 'l/s'")
}
QupstrUnit <- match.arg(arg = QupstrUnit, choices = c("mm", "m3", "m3/s", "l/s", "L/s"))
}
##check_NA_values
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment