Commit 919dc477 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

style: remove the extra whitespaces

parent 5a7cbe6c
Pipeline #26029 failed with stages
in 74 minutes and 54 seconds
...@@ -404,7 +404,7 @@ Calibration_Michel <- function(InputsModel, ...@@ -404,7 +404,7 @@ Calibration_Michel <- function(InputsModel,
listNameCrit <- OutputsCrit$CritCompo$MultiCritNames listNameCrit <- OutputsCrit$CritCompo$MultiCritNames
msgForm <- paste(sprintf("%.2f", listweights), listNameCrit, sep = " * ", collapse = ", ") msgForm <- paste(sprintf("%.2f", listweights), listNameCrit, sep = " * ", collapse = ", ")
msgForm <- unlist(strsplit(msgForm, split = ",")) msgForm <- unlist(strsplit(msgForm, split = ","))
msgFormSep <- rep(c(",", ",", ",\n\t\t "), times = ceiling(length(msgForm)/3))[1: length(msgForm)] msgFormSep <- rep(c(",", ",", ",\n\t\t "), times = ceiling(length(msgForm)/3))[1:length(msgForm)]
msgForm <- paste(msgForm, msgFormSep, sep = "", collapse = "") msgForm <- paste(msgForm, msgFormSep, sep = "", collapse = "")
msgForm <- gsub("\\,\\\n\\\t\\\t $|\\,$", "", msgForm) msgForm <- gsub("\\,\\\n\\\t\\\t $|\\,$", "", msgForm)
message("\tFormula: sum(", msgForm, ")") message("\tFormula: sum(", msgForm, ")")
......
...@@ -31,7 +31,7 @@ ErrorCrit_KGE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T ...@@ -31,7 +31,7 @@ ErrorCrit_KGE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
Crit <- 0 Crit <- 0
} }
} else { } else {
Crit <- Numer / (Deno1 * Deno2) Crit <- Numer / (Deno1 * Deno2)
} }
if (is.numeric(Crit) & is.finite(Crit)) { if (is.numeric(Crit) & is.finite(Crit)) {
SubCritValues[1L] <- Crit SubCritValues[1L] <- Crit
......
...@@ -5,7 +5,7 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = ...@@ -5,7 +5,7 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
stop("'OutputsModel' must be of class 'OutputsModel'") stop("'OutputsModel' must be of class 'OutputsModel'")
} }
EC <- .ErrorCrit(InputsCrit = InputsCrit, Crit = "KGE2", OutputsModel = OutputsModel, warnings = warnings) EC <- .ErrorCrit(InputsCrit = InputsCrit, Crit = "KGE2", OutputsModel = OutputsModel, warnings = warnings)
CritValue <- NA CritValue <- NA
SubCritValues <- rep(NA, 3) SubCritValues <- rep(NA, 3)
...@@ -31,7 +31,7 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = ...@@ -31,7 +31,7 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
Crit <- 0 Crit <- 0
} }
} else { } else {
Crit <- Numer / (Deno1 * Deno2) Crit <- Numer / (Deno1 * Deno2)
} }
if (is.numeric(Crit) & is.finite(Crit)) { if (is.numeric(Crit) & is.finite(Crit)) {
SubCritValues[1L] <- Crit SubCritValues[1L] <- Crit
......
...@@ -5,7 +5,7 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T ...@@ -5,7 +5,7 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
stop("'OutputsModel' must be of class 'OutputsModel'") stop("'OutputsModel' must be of class 'OutputsModel'")
} }
EC <- .ErrorCrit(InputsCrit = InputsCrit, Crit = "NSE", OutputsModel = OutputsModel, warnings = warnings) EC <- .ErrorCrit(InputsCrit = InputsCrit, Crit = "NSE", OutputsModel = OutputsModel, warnings = warnings)
CritValue <- NA CritValue <- NA
......
...@@ -5,7 +5,7 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = ...@@ -5,7 +5,7 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
stop("'OutputsModel' must be of class 'OutputsModel'") stop("'OutputsModel' must be of class 'OutputsModel'")
} }
EC <- .ErrorCrit(InputsCrit = InputsCrit, Crit = "RMSE", OutputsModel = OutputsModel, warnings = warnings) EC <- .ErrorCrit(InputsCrit = InputsCrit, Crit = "RMSE", OutputsModel = OutputsModel, warnings = warnings)
CritValue <- NA CritValue <- NA
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
FUN_GR <- TransfoParam_CemaNeige FUN_GR <- TransfoParam_CemaNeige
} }
} else { } else {
# Fatal error if the TransfoParam function does not exist # fatal error if the TransfoParam function does not exist
FUN_GR <- match.fun(sprintf("TransfoParam_%s", FeatFUN_MOD$CodeModHydro)) FUN_GR <- match.fun(sprintf("TransfoParam_%s", FeatFUN_MOD$CodeModHydro))
} }
......
Markdown is supported
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