Commit 4bccfee2 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

Merge branch '192-indperiod_plot-not-working-as-expected' into 'dev'

Resolve "IndPeriod_Plot not working as expected"

Closes #192

See merge request !100
1 merge request!100Resolve "IndPeriod_Plot not working as expected"
Pipeline #63163 failed with stages
in 85 minutes and 52 seconds
Showing with 3 additions and 2 deletions
+3 -2
......@@ -19,10 +19,11 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
## index time series
if (!is.null(IndPeriod_Plot)) {
if (length(IndPeriod_Plot) == 0) {
if (length(IndPeriod_Plot) <= 1 || any(IndPeriod_Plot <= 0)) {
IndPeriod_Plot <- seq_along(OutputsModel$DatesR)
stop('IndPeriod_Plot must be a positive vector of length > 0')
}
IndPeriod_Plot <- seq_along(IndPeriod_Plot)
# IndPeriod_Plot <- seq_along(IndPeriod_Plot)
OutputsModel <- .IndexOutputsModel(OutputsModel, IndPeriod_Plot)
Qobs <- Qobs[IndPeriod_Plot]
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment