X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2Fplot.R;fp=pkg%2FR%2Fplot.R;h=d501d9eaefceee4a312a9e65ad02e92a92012176;hp=b5a8e4b636c1e146cda9207b8b6c124c83cca345;hb=2e0ef04b1bb097b43df90afe8e7200c39421aff2;hpb=10886062b38b7373ce6f418b6df6da16badd9393 diff --git a/pkg/R/plot.R b/pkg/R/plot.R index b5a8e4b..d501d9e 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -64,7 +64,8 @@ plotPredReal <- function(data, pred, index) measure = data$getSerie( pred$getIndexInData(index) )[1:length(pred$getForecast(1))] # Remove the common part, where prediction == measure - dot_mark <- ifelse(prediction[1]==measure[1], which.max(prediction==measure), 0) + dot_mark <- ifelse(prediction[1]==measure[1], + which.max(seq_along(prediction)[prediction==measure]), 0) prediction = prediction[(dot_mark+1):length(prediction)] measure = measure[(dot_mark+1):length(measure)]