projects
/
talweg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
'update'
[talweg.git]
/
pkg
/
R
/
J_Neighbors.R
diff --git
a/pkg/R/J_Neighbors.R
b/pkg/R/J_Neighbors.R
index
2caedc5
..
ceea803
100644
(file)
--- a/
pkg/R/J_Neighbors.R
+++ b/
pkg/R/J_Neighbors.R
@@
-18,6
+18,9
@@
getNeighborsJumpPredict = function(data, today, memory, predict_from, horizon,
indices = params$indices[filter]
weights = params$weights[filter]
+ if (is.na(indices[1]))
+ return (NA)
+
gaps = sapply(indices, function(i) {
if (predict_from >= 2)
data$getSerie(i)[predict_from] - data$getSerie(i)[predict_from-1]