X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=pkg%2FR%2Futils.R;h=5ba72f05684ae4b61f9785f161461e3659bd2901;hb=3ddf1c12af0c167fe7d3bb59e63258550270cfc5;hp=3124881faabcedf1f0a30581195056c54c2b7f9f;hpb=102bcfda4afbb5cfee885cbee0f55545624168fd;p=talweg.git diff --git a/pkg/R/utils.R b/pkg/R/utils.R index 3124881..5ba72f0 100644 --- a/pkg/R/utils.R +++ b/pkg/R/utils.R @@ -117,19 +117,3 @@ getSimilarDaysIndices = function(index, data, limit, same_season, days_in=NULL) return (day <= 4) return (day == day_ref) } - -#' getNoNA2 -#' -#' Get indices in data of no-NA series followed by no-NA, within [first,last] range. -#' -#' @inheritParams dateIndexToInteger -#' @param first First index (included) -#' @param last Last index (included) -#' -#' @export -getNoNA2 = function(data, first, last) -{ - (first:last)[ sapply(first:last, function(i) - !any( is.na(data$getCenteredSerie(i)) | is.na(data$getCenteredSerie(i+1)) ) - ) ] -}