From 76b9df44ec9af260705c3da68edb55b11d513caf Mon Sep 17 00:00:00 2001 From: unknown <olivier.delaigue@ANPI1430.antony.irstea.priv> Date: Wed, 16 Aug 2017 10:18:19 +0200 Subject: [PATCH] v1.0.9.21 CreateInputsModel now stops when DatesR contains duplicated values --- DESCRIPTION | 4 ++-- R/CreateInputsModel.R | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e7e083d4..dc181d42 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.0.9.20 -Date: 2017-08-11 +Version: 1.0.9.21 +Date: 2017-08-16 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), person("Charles", "Perrin", role = c("aut", "ths")), diff --git a/R/CreateInputsModel.R b/R/CreateInputsModel.R index 5b6c7c88..640c30e1 100644 --- a/R/CreateInputsModel.R +++ b/R/CreateInputsModel.R @@ -79,6 +79,10 @@ CreateInputsModel <- function(FUN_MOD, stop(paste( "the time step of the model inputs must be ", TimeStep, " seconds \n", sep = "")) return(NULL) } + if (anyDuplicated(DatesR) != 0) { + stop("DatesR must not include duplicated values \n") + return(NULL) + } LLL <- length(DatesR) } if ("GR" %in% ObjectClass) { -- GitLab