Commit 1e85973c authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.16.15 CLEAN: new msg management for the "which" argument in the plot.OutputsModel fun

Showing with 6 additions and 16 deletions
+6 -16
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.16.14
Version: 1.2.16.15
Date: 2019-06-06
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -14,7 +14,7 @@ output:
### 1.2.16.14 Release Notes (2019-06-06)
### 1.2.16.15 Release Notes (2019-06-06)
#### New features
......
......@@ -103,28 +103,18 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
"\n\tit can only contain ",
paste0(shQuote(c(whichDashboard, whichAll[!whichAll %in% whichCN])), collapse = ", "))
}
if (any(which %in% whichAll) & any(which %in% whichDashboard)) {
warning(sprintf("only %s will be used", whichDashboard[whichDashboard %in% which]))
}
if (sum(which %in% whichDashboard) > 1) {
warning(sprintf("only %s will be used", whichDashboard[whichDashboard %in% which]))
}
if ("perf" %in% which) {
which <- whichPerf
which <- c(which, whichPerf)
}
if ("ts" %in% which) {
which <- whichTS
which <- c(which, whichTS)
}
if ("synth" %in% which) {
which <- whichSynth
which <- c(which, whichSynth)
}
if ("all" %in% which) {
which <- whichAll
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'")
......
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