You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an error after running the na_kalman from imputeTS library. This function works on part of the xts time series object I was testing, although it returns an error if applied on all of it.
The error is:
Error in if (frequency > 1 && 0 < (d <- abs(frequency - round(frequency))) && :
missing value where TRUE/FALSE needed
This is the structure of the its object:
str(SCADA_xts)
An ‘xts’ object on 2017-04-18 20:00:00/2019-07-31 20:00:00 containing:
Data: num [1:64120, 1] 198348 198618 195981 188490 186822 ...
Indexed by objects of class: [POSIXct,POSIXt] TZ: America/Toronto
xts Attributes:
NULL
Do you have any idea what might be wrong with my data?
Thanks and best regards,
Mehrdad
The text was updated successfully, but these errors were encountered:
Sounds great 👍
Always complicated, everybody uses different time series objects in R....zoo, xts, tsibble, tibble, data.frame, vector.
imputeTS is written for vector, data.frame and ts inputs.
But I try to keep it compatible with all of the different possible time series objects.
Still, as you can see, for time to time errors occur for certain edge cases. This one seems to be present specifically for na_kalman in combination with xts objects. I'll additionally have a look in the upcoming days if I can prevent this error for xts objects.
Hi Steffen and Bartz,
I got an error after running the na_kalman from imputeTS library. This function works on part of the xts time series object I was testing, although it returns an error if applied on all of it.
The error is:
Error in if (frequency > 1 && 0 < (d <- abs(frequency - round(frequency))) && :
missing value where TRUE/FALSE needed
This is the structure of the its object:
An ‘xts’ object on 2017-04-18 20:00:00/2019-07-31 20:00:00 containing:
Data: num [1:64120, 1] 198348 198618 195981 188490 186822 ...
Indexed by objects of class: [POSIXct,POSIXt] TZ: America/Toronto
xts Attributes:
NULL
Do you have any idea what might be wrong with my data?
Thanks and best regards,
Mehrdad
The text was updated successfully, but these errors were encountered: