SteffenMoritz/imputeTS

Some gap sizes are not shown in plotNA.gapsize()?

earowang opened this issue · 1 comments

The plotNA.gapsize() plots 10 gap sizes, but the full length of gaps is 23 instead? The range between 6 and 26 seems to be ignored.

library(imputeTS)
#> Registered S3 method overwritten by 'xts':
#>   method     from
#>   as.zoo.xts zoo
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo
#> Registered S3 methods overwritten by 'forecast':
#>   method             from    
#>   fitted.fracdiff    fracdiff
#>   residuals.fracdiff fracdiff
plotNA.gapsize(tsNH4)

rle_na <- rle(is.na(tsNH4))
table(rle_na$lengths[rle_na$values])
#> 
#>   1   2   3   4   5   6   7   8   9  10  11  12  14  16  17  21  25  26 
#>  68  26  16  10   8   4   2   3   2   1   1   2   1   1   1   1   1   1 
#>  27  32  42  91 157 
#>   1   1   2   1   1

Created on 2019-07-08 by the reprex package (v0.3.0)

Oops, I just released the argument limit controlling the gap sizes. Sorry.