diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2017-06-20 14:16:14 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2017-06-20 14:16:14 +0200 |
commit | 0d60c88ba7e0693a832056ea3db5cc0eaf3b0819 (patch) | |
tree | ad8d3f3b597cfeab23627600573bd1762e9064d2 | |
parent | dc1e49c8bb27cac81268719055bc4336843c0506 (diff) |
Fix line endings and allow all interception classes
-rw-r--r-- | R/PEC_sw_focus.R | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/R/PEC_sw_focus.R b/R/PEC_sw_focus.R index cbf182d..aed83a0 100644 --- a/R/PEC_sw_focus.R +++ b/R/PEC_sw_focus.R @@ -70,7 +70,8 @@ PEC_sw_focus <- function(parent, rate, n = 1, i = NA, scenario = FOCUS_Step_12_scenarios$names, region = c("n", "s"), season = c(NA, "of", "mm", "js"), - interception = "no interception", + interception = c("no interception", "minimal crop cover", + "average crop cover", "full canopy"), txt_file = "pesticide.txt", overwrite = FALSE, append = TRUE) { if (n > 1 & is.na(i)) stop("Please specify the interval i if n > 1") @@ -101,7 +102,8 @@ PEC_sw_focus <- function(parent, rate, n = 1, i = NA, "DT50 water", "DT50 sediment", "Region / Season", "Interception class") - add_line <- function(x) cat(paste0(x, "\r\n"), file = txt, append = TRUE) + add_line <- function(x) cat(x, sep = "\r\n", + file = txt, append = TRUE) if (file.exists(txt_file)) { if (append) { txt <- file(txt_file, "a") |