projects
/
talweg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
almost finished debug
[talweg.git]
/
pkg
/
R
/
Data.R
diff --git
a/pkg/R/Data.R
b/pkg/R/Data.R
index
e33e480
..
35f8524
100644
(file)
--- a/
pkg/R/Data.R
+++ b/
pkg/R/Data.R
@@
-30,7
+30,9
@@
#' \item{\code{getExo(index)}}
#' {Get exogenous variables at specified index.}
#' \item{\code{getExoHat(index)}}
#' \item{\code{getExo(index)}}
#' {Get exogenous variables at specified index.}
#' \item{\code{getExoHat(index)}}
-#' {Get estimated exogenous variables at specified index.}}
+#' {Get estimated exogenous variables at specified index.}
+#' \item{\code{getCoupleDays(first,last)}}
+#' {Get indices of no-NA series followed by no-NA, within [first,last] range.}}
Data = R6::R6Class("Data",
private = list(
.data = list()
Data = R6::R6Class("Data",
private = list(
.data = list()
@@
-83,5
+85,14
@@
Data = R6::R6Class("Data",
,
removeLast = function()
private$.data <- private$.data[1:(length(private$.data)-1)]
,
removeLast = function()
private$.data <- private$.data[1:(length(private$.data)-1)]
+ ,
+ getCoupleDays = function(first, last)
+ {
+ (first:last)[ sapply(first:last, function(i) {
+ !any(
+ is.na(private$.data$getCenteredSerie(i)) |
+ is.na(private$.data$getCenteredSerie(i+1)) )
+ }) ]
+ }
)
)
)
)