Commit ca0707d6 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.16.2 CLEAN: warning messages revised in plot.Outputsmodel

Showing with 6 additions and 6 deletions
+6 -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.1 Version: 1.2.16.2
Date: 2019-05-20 Date: 2019-05-22
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")),
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@irstea.fr"), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@irstea.fr"),
......
...@@ -14,7 +14,7 @@ output: ...@@ -14,7 +14,7 @@ output:
### 1.2.16.1 Release Notes (2019-05-20) ### 1.2.16.2 Release Notes (2019-05-22)
#### New features #### New features
......
...@@ -78,7 +78,7 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -78,7 +78,7 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
if (!is.character(which)) { if (!is.character(which)) {
stop("'which' must be a vector of character") stop("'which' must be a vector of character")
} }
if (any(!which %in% c("all", "synth", "ts", "perf", "PotEvap", "Precip", 'Temp', "SnowPack", "Flows", "Error", "Regime", "CumFreq", "CorQQ"))) { if (any(!which %in% c("all", "synth", "ts", "perf", "PotEvap", "Precip", "Temp", "SnowPack", "Flows", "Error", "Regime", "CumFreq", "CorQQ"))) {
stop("incorrect element found in argument 'which':\nit can only contain 'all', 'synth', 'ts', 'perf', 'Precip', 'PotEvap', 'Temp', 'SnowPack', 'Error', 'Flows', 'Regime', 'CumFreq' or 'CorQQ'") stop("incorrect element found in argument 'which':\nit can only contain 'all', 'synth', 'ts', 'perf', 'Precip', 'PotEvap', 'Temp', 'SnowPack', 'Error', 'Flows', 'Regime', 'CumFreq' or 'CorQQ'")
} }
if (all(which %in% c("Temp", "SnowPack")) & !inherits(OutputsModel, "CemaNeige")) { if (all(which %in% c("Temp", "SnowPack")) & !inherits(OutputsModel, "CemaNeige")) {
...@@ -103,11 +103,11 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -103,11 +103,11 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
if (is.null(Qobs)) { if (is.null(Qobs)) {
if (length(which) == 1 & any(which %in% "Error")) { if (length(which) == 1 & any(which %in% "Error")) {
stop("the 'Error' time srie cannot be draw if there is no 'Qobs'") stop("the 'Error' time series cannot be drawn if there is no 'Qobs'")
} }
if (length(which) != 1 & any(which %in% c("Error", "all"))) { if (length(which) != 1 & any(which %in% c("Error", "all"))) {
BOOL_Error <- FALSE BOOL_Error <- FALSE
warning("the 'Error' time serie cannot be draw if there is no 'Qobs'") warning("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