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

v1.6.8.34 refactor: remove useless warning message in getAggregConvertFun

Refs 213e4c9b, 3e49873d #41
Showing with 10 additions and 22 deletions
+10 -22
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.8.33
Version: 1.6.8.34
Date: 2021-01-05
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -2,7 +2,7 @@
### 1.6.8.33 Release Notes (2021-01-05)
### 1.6.8.34 Release Notes (2021-01-05)
#### New features
......
SeriesAggreg.InputsModel <- function(x, ...) {
res <- suppressMessages(
SeriesAggreg.list(x,
ConvertFun = getAggregConvertFun(names(x)),
except = c("ZLayers", "LengthHydro", "BasinAreas"),
...)
)
return(res)
SeriesAggreg.list(x,
ConvertFun = getAggregConvertFun(names(x)),
except = c("ZLayers", "LengthHydro", "BasinAreas"),
...)
}
SeriesAggreg.OutputsModel <- function(x, ...) {
res <- suppressMessages(
SeriesAggreg.list(x,
ConvertFun = getAggregConvertFun(names(x)),
except = "StateEnd",
...)
)
return(res)
SeriesAggreg.list(x,
ConvertFun = getAggregConvertFun(names(x)),
except = "StateEnd",
...)
}
......@@ -53,11 +53,5 @@ getAggregConvertFun <- function(Outputs) {
iRes <- AggregConvertFunTable$ConvertFun[AggregConvertFunTable$Outputs == iOutputs]
iRes <- ifelse(test = any(is.na(iRes)), yes = NA, no = iRes) # R < 4.0 compatibility
})
if (length(res) > 0) {
message("Variables automatically aggregated as follow:")
widthMsg <- max(nchar(c(names(res), res)), na.rm = TRUE) + 1 + 2
message(format(names(res) , width = widthMsg, justify = "right"))
message(format(shQuote(res), width = widthMsg, justify = "right"))
}
return(res)
}
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