From 1e85973cf1796cfa2b597910a3361dd97d35f262 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Thu, 6 Jun 2019 15:33:46 +0200 Subject: [PATCH] v1.2.16.15 CLEAN: new msg management for the "which" argument in the plot.OutputsModel fun --- DESCRIPTION | 2 +- NEWS.rmd | 2 +- R/plot.OutputsModel.R | 18 ++++-------------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 61522863..03026421 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.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")), diff --git a/NEWS.rmd b/NEWS.rmd index 81de36da..af2addba 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -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 diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index 4a54cef9..95e095a2 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -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'") -- GitLab