summaryrefslogtreecommitdiff
path: root/R/PEC_sw_drift.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/PEC_sw_drift.R')
-rw-r--r--R/PEC_sw_drift.R8
1 files changed, 6 insertions, 2 deletions
diff --git a/R/PEC_sw_drift.R b/R/PEC_sw_drift.R
index 413388c..05f90dd 100644
--- a/R/PEC_sw_drift.R
+++ b/R/PEC_sw_drift.R
@@ -120,10 +120,14 @@ PEC_sw_drift <- function(rate,
drift_data <- match.arg(drift_data)
unmatched_crop_groups_JKI <- setdiff(crop_group_JKI, colnames(pfm::drift_data_JKI[[1]]))
- if (length(unmatched_crop_groups_JKI) > 0) stop("Crop group(s) ", unmatched_crop_groups_JKI, " not supported")
+ if (length(unmatched_crop_groups_JKI) > 0) {
+ stop("Crop group(s) ", paste(unmatched_crop_groups_JKI, collapse = ", "), " not supported")
+ }
unmatched_crop_groups_RF <- setdiff(crop_group_RF, unique(pfm::drift_parameters_focus$crop_group))
- if (length(unmatched_crop_groups_RF) > 0) stop("Crop group(s) ", unmatched_crop_groups_RF, " not supported")
+ if (length(unmatched_crop_groups_RF) > 0) {
+ stop("Crop group(s) ", paste(unmatched_crop_groups_RF, collapse = ", "), "not supported")
+ }
if (drift_data == "JKI" & crop_group_RF[1] != "arable") {
stop("Specifying crop_group_RF only makes sense if 'RF' is used for 'drift_data'")

Contact - Imprint