diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index a5516cc70e0e4911a1e07bb47d0e931dfb668790..e90893e844e192f2b05bcf629954209b39161eb0 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -19,9 +19,9 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ## index time series if (!is.null(IndPeriod_Plot)) { - if (length(IndPeriod_Plot) == 0 || any(IndPeriod_Plot <= 0)) { + if (length(IndPeriod_Plot) <= 1 || any(IndPeriod_Plot <= 0)) { IndPeriod_Plot <- seq_along(OutputsModel$DatesR) - warning('IndPeriod_Plot') + stop('IndPeriod_Plot must be a positive vector of length > 0') } # IndPeriod_Plot <- seq_along(IndPeriod_Plot) OutputsModel <- .IndexOutputsModel(OutputsModel, IndPeriod_Plot)