Commit 769491fe authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.6.3.22 refactor: comment unused rolling mean functions in plot.OutputsModel

Showing with 9 additions and 9 deletions
+9 -9
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.6.3.21 Version: 1.6.3.22
Date: 2020-10-16 Date: 2020-10-26
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@inrae.fr"), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
### 1.6.3.21 Release Notes (2020-10-16) ### 1.6.3.22 Release Notes (2020-10-26)
#### New features #### New features
......
...@@ -149,12 +149,12 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -149,12 +149,12 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
} }
if (BOOL_Dates) { if (BOOL_Dates) {
MyRollMean1 <- function(x, n) { # MyRollMean1 <- function(x, n) {
return(filter(x, rep(1 / n, n), sides = 2)) # return(filter(x, rep(1 / n, n), sides = 2))
} # }
MyRollMean2 <- function(x, n) { # MyRollMean2 <- function(x, n) {
return(filter(c(tail(x, n %/% 2), x, x[1:(n %/% 2)]), rep(1 / n, n), sides = 2)[(n %/% 2 + 1):(length(x) + n %/% 2)]) # return(filter(c(tail(x, n %/% 2), x, x[1:(n %/% 2)]), rep(1 / n, n), sides = 2)[(n %/% 2 + 1):(length(x) + n %/% 2)])
} # }
MyRollMean3 <- function(x, n) { MyRollMean3 <- function(x, n) {
return(filter(x, filter = rep(1 / n, n), sides = 2, circular = TRUE)) return(filter(x, filter = rep(1 / n, n), sides = 2, circular = TRUE))
} }
......
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