From 769491fea79163526c63b72e022926091f2e8ffa Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.fr> Date: Mon, 26 Oct 2020 15:42:03 +0100 Subject: [PATCH] v1.6.3.22 refactor: comment unused rolling mean functions in plot.OutputsModel --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- R/plot.OutputsModel.R | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6f0c4bf5..d44bc3fa 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.6.3.21 -Date: 2020-10-16 +Version: 1.6.3.22 +Date: 2020-10-26 Authors@R: c( 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"), diff --git a/NEWS.md b/NEWS.md index 685c81d8..4c1e6363 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ -### 1.6.3.21 Release Notes (2020-10-16) +### 1.6.3.22 Release Notes (2020-10-26) #### New features diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index 85d2418e..8a52f9d3 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -149,12 +149,12 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = } if (BOOL_Dates) { - MyRollMean1 <- function(x, n) { - return(filter(x, rep(1 / n, n), sides = 2)) - } - 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)]) - } + # MyRollMean1 <- function(x, n) { + # return(filter(x, rep(1 / n, n), sides = 2)) + # } + # 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)]) + # } MyRollMean3 <- function(x, n) { return(filter(x, filter = rep(1 / n, n), sides = 2, circular = TRUE)) } -- GitLab