diff --git a/DESCRIPTION b/DESCRIPTION index 70b5170a3e58391e31b4bc09ea3f8529468ee12b..4587a6a55e7998daa06c060272935115824a12a4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.2.16.19 +Version: 1.2.16.20 Date: 2019-06-06 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index 06ab20cab123c751f3f36c659de968cea04fdd49..36d879a1c604e230a657c312d09f9e1cd2cab61f 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.2.16.19 Release Notes (2019-06-06) +### 1.2.16.20 Release Notes (2019-06-06) #### New features diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index cf91f056458c34b38aa1ae5c6db03e030f35a40b..42d5fbabfb5b7faf002d7b1636fe06a2500fd162 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -116,12 +116,14 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = which <- c(which, whichAll) } if (is.null(Qobs)) { - if (length(which) == 1 & any(which %in% "Error")) { - stop("the 'Error' time series cannot be drawn if there is no 'Qobs'") + if (length(which) == 1 & any(which %in% c("CorQQ", "Error"))) { + stop(sprintf("the %s time series cannot be drawn if there is no 'Qobs'", shQuote(which))) } - if (length(which) != 1 & any(which %in% c("Error", "all"))) { + if (length(which) != 1 & any(which %in% c("CorQQ", "Error"))) { + BOOL_CorQQ <- FALSE BOOL_Error <- FALSE - warning("the 'Error' time series cannot be drawn if there is no 'Qobs'") + warning(sprintf("the %s time series cannot be drawn if there is no 'Qobs'", + paste0(shQuote(c("CorQQ", "Error")), collapse = " and "))) } }