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

v1.1.3.11 CLEAN: remove return(NULL) after error in ErrorCrit_*

Showing with 2 additions and 14 deletions
+2 -14
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.3.10
Version: 1.1.3.11
Date: 2019-02-21
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -13,7 +13,7 @@ output:
### 1.1.3.10 Release Notes (2019-02-21)
### 1.1.3.11 Release Notes (2019-02-21)
......
......@@ -4,15 +4,12 @@ ErrorCrit_KGE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
##Arguments_check________________________________
if (!inherits(InputsCrit, "InputsCrit")) {
stop("InputsCrit must be of class 'InputsCrit'")
return(NULL)
}
if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) {
stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' or 'Compo' with KGE")
return(NULL)
}
if (!inherits(OutputsModel, "OutputsModel")) {
stop("OutputsModel must be of class 'OutputsModel'")
return(NULL)
}
......
......@@ -4,15 +4,12 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
##Arguments_check________________________________
if (!inherits(InputsCrit, "InputsCrit")) {
stop("InputsCrit must be of class 'InputsCrit'")
return(NULL)
}
if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) {
stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' or 'Compo' with KGE'")
return(NULL)
}
if (!inherits(OutputsModel, "OutputsModel")) {
stop("OutputsModel must be of class 'OutputsModel'")
return(NULL)
}
......
......@@ -4,15 +4,12 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
##Arguments_check________________________________
if (!inherits(InputsCrit, "InputsCrit")) {
stop("InputsCrit must be of class 'InputsCrit'")
return(NULL)
}
if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) {
stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' or 'Compo' with NSE")
return(NULL)
}
if (!inherits(OutputsModel, "OutputsModel")) {
stop("OutputsModel must be of class 'OutputsModel'")
return(NULL)
}
......
......@@ -4,15 +4,12 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
##Arguments_check________________________________
if (!inherits(InputsCrit, "InputsCrit")) {
stop("InputsCrit must be of class 'InputsCrit'")
return(NULL)
}
if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) {
stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' with RMSE")
return(NULL)
}
if (!inherits(OutputsModel, "OutputsModel")) {
stop("OutputsModel must be of class 'OutputsModel'")
return(NULL)
}
......
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