Commit 2ea7b551 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.16.20 NEW: warning msg added when which = "CorQQ" and there is no 'Qobs'...

v1.2.16.20 NEW: warning msg added when which = "CorQQ" and there is no 'Qobs' in plot.OutputsModel fun
Showing with 8 additions and 6 deletions
+8 -6
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.16.19 Version: 1.2.16.20
Date: 2019-06-06 Date: 2019-06-06
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -14,7 +14,7 @@ output: ...@@ -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 #### New features
......
...@@ -116,12 +116,14 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -116,12 +116,14 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
which <- c(which, whichAll) which <- c(which, whichAll)
} }
if (is.null(Qobs)) { if (is.null(Qobs)) {
if (length(which) == 1 & any(which %in% "Error")) { if (length(which) == 1 & any(which %in% c("CorQQ", "Error"))) {
stop("the 'Error' time series cannot be drawn if there is no 'Qobs'") 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 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 ")))
} }
} }
......
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