From 3f1880ddeaecfcc40c7f58763695c00d8f1630fd Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 21 May 2021 11:43:11 +0200 Subject: [PATCH] Add param 'sdates' check --- R/PlotAno.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/PlotAno.R b/R/PlotAno.R index 922806aa..a7428899 100644 --- a/R/PlotAno.R +++ b/R/PlotAno.R @@ -117,6 +117,11 @@ PlotAno <- function(exp_ano, obs_ano = NULL, sdates, toptitle = rep('', 15), } else { nobs <- 0 } + # sdate check + if (!all(nchar(sdates) == 8)) { + stop ("The parameter 'sdates' must be formatted as YYYYMMDD.") + } + if (is.null(limits) == TRUE) { if (memb) { ll <- min(min(exp_ano, na.rm = TRUE), min(obs_ano, na.rm = TRUE), na.rm = TRUE) -- GitLab