diff --git a/R/PlotAno.R b/R/PlotAno.R index 08a9ab88ceff4bfbcd3130203f42e031f0a3ceed..9a4a97141268bde9e6c80c985e7342dbeb9898f2 100644 --- a/R/PlotAno.R +++ b/R/PlotAno.R @@ -110,6 +110,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)