diff --git a/R/PlotAno.R b/R/PlotAno.R index 922806aa227ec5ab9993a87212f110cb718f9561..a7428899b2e31e56337e928965b6f0ecb188a390 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)