SteffenMoritz/imputeTS

na_replace doesn't allow replacement full NA vector

Closed this issue · 3 comments

Dear Steffen,

Thanks for this nice package. Is there a reason the na_replace function doesn't allow for a vector filled with only NA's to be replaced with values?

If so, the error message
if (all(missindx)) { stop("Input data has only NAs. Input data needs at least 1 non-NA data point for applying na_mean") }
seems to contain an type. Shouldn't it be: ... for applying _na_replace_ ?

If not, could the check # 1.3 Check for algorithm specific minimum amount of non-NA values be removed? (If you prefer, I will happily do a PR to adjust is myself).

Cheers,

Jan

Hey Jan,
thanks a lot for opening an issue and the nice suggestions :)

This is definitely an error. I gave it a quick thought and I think as you suggested is the best solution to allow all NA vectors here. (since na_replace is the only provided function that can actually be used with all NA vectors)

I will directly try to make an update - should be a quick fix :)

You're welcome!

Thanks for the update, keep up the good work!

Fixed it, on Github already :-)
Will be included in the next CRAN update (which will be probably in 1 or 2 month)

And as I said many thanks for reporting this issue!

Mentioned you in the package News:
https://github.com/SteffenMoritz/imputeTS/blob/master/NEWS.md