diff --git a/DESCRIPTION b/DESCRIPTION index 0107f6b1050349ce9660a1781fa634b15d164c4c..7bfe39274afb2b93a3411bc8c36edc4fe1c87038 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.27 +Version: 1.2.16.28 Date: 2019-06-07 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 fe1b98c78ea35054daa525533548bb4c8b4ce992..68cbb735d955f98cec531f6a540cd13f2a45a61b 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.2.16.27 Release Notes (2019-06-07) +### 1.2.16.28 Release Notes (2019-06-07) #### New features diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index 04dad71eb5b1bb29934ef6a3a3845c5f6ca5626b..f5b06900c57965f6092c67c621bd543c261c60fe 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -70,6 +70,7 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ## check 'which' + whichNeedQobs <- c("Error", "CorQQ") whichDashboard <- c("all", "synth", "ts", "perf") whichAll <- c("Precip", "PotEvap", "Temp", "SnowPack", "Flows", "Error", "Regime", "CumFreq", "CorQQ") whichSynth <- c("Precip" , "Temp", "SnowPack", "Flows" , "Regime", "CumFreq", "CorQQ") @@ -116,14 +117,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% c("CorQQ", "Error"))) { + if (length(which) == 1 & any(which %in% whichNeedQobs)) { stop(sprintf("the %s plot(s) cannot be drawn if there is no 'Qobs'", shQuote(which))) } - if (length(which) != 1 & any(which %in% c("CorQQ", "Error"))) { + if (length(which) != 1 & any(which %in% whichNeedQobs)) { BOOL_CorQQ <- FALSE BOOL_Error <- FALSE warning(sprintf("the %s plot(s) cannot be drawn if there is no 'Qobs'", - paste0(shQuote(c("CorQQ", "Error")), collapse = " and "))) + paste0(shQuote(whichNeedQobs), collapse = " and "))) } }