diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/DESCRIPTION | 4 | ||||
-rw-r--r-- | pkg/R/TOXSWA_cwa.R | 8 | ||||
-rw-r--r-- | pkg/man/read.TOXSWA_cwa.Rd | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION index e597f10..6adca34 100644 --- a/pkg/DESCRIPTION +++ b/pkg/DESCRIPTION @@ -1,8 +1,8 @@ Package: pfm Type: Package Title: Utilities for Pesticide Fate Modelling -Version: 0.3-4 -Date: 2016-03-10 +Version: 0.3-5 +Date: 2016-06-08 Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de", role = c("aut", "cre", "cph")) Description: Utilities for simple calculations of predicted environmental diff --git a/pkg/R/TOXSWA_cwa.R b/pkg/R/TOXSWA_cwa.R index d2720a9..5f32860 100644 --- a/pkg/R/TOXSWA_cwa.R +++ b/pkg/R/TOXSWA_cwa.R @@ -1,4 +1,4 @@ -# Copyright (C) 2014,2015 Johannes Ranke +# Copyright (C) 2014,2015,2016 Johannes Ranke # Contact: jranke@uni-bremen.de # This file is part of the R package pfm @@ -19,7 +19,9 @@ #' #' Read TOXSWA hourly concentrations of a chemical substance in a specific #' segment of a TOXSWA surface water body. Per default, the data for the last -#' segment are imported. +#' segment are imported. As TOXSWA reports the values at the end of the hour +#' (ConLiqWatLayCur) in its summary file, we use this value as well instead +#' of the hourly averages (ConLiqWatLay). #' #' @param filename The filename of the cwa file (TOXSWA 2.x.y or similar) or the #' out file (FOCUS TOXSWA 4, i.e. TOXSWA 4.4.2 or similar). @@ -225,7 +227,7 @@ TOXSWA_cwa <- R6Class("TOXSWA_cwa", if (inherits(outfile, "try-error")) { stop("Could not read ", filename) } else { - cwa_lines <- outfile[grep("ConLiqWatLay_", outfile)] # hourly concentrations + cwa_lines <- outfile[grep("ConLiqWatLayCur_", outfile)] # concentrations at end of hour cwa_all_segments <- read_fwf(paste(cwa_lines, collapse = "\n"), fwf_empty(paste(tail(cwa_lines), collapse = "\n"))) diff --git a/pkg/man/read.TOXSWA_cwa.Rd b/pkg/man/read.TOXSWA_cwa.Rd index 44a7542..aca2a56 100644 --- a/pkg/man/read.TOXSWA_cwa.Rd +++ b/pkg/man/read.TOXSWA_cwa.Rd @@ -35,7 +35,9 @@ An instance of an R6 object of class \description{ Read TOXSWA hourly concentrations of a chemical substance in a specific segment of a TOXSWA surface water body. Per default, the data for the last -segment are imported. +segment are imported. As TOXSWA reports the values at the end of the hour +(ConLiqWatLayCur) in its summary file, we use this value as well instead +of the hourly averages (ConLiqWatLay). } \examples{ H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", |