"time series must have at least two observations" runner function error message

I a facing a problem when trying to apply a function on a sliding window of my time series data.

here is my code:

z=read.delim("my_timeseries_data")
runner(z, k= 500, f = function(z){
  plomb = lsp(z, plot = TRUE)
  }
) 

the error message is: Error in lsp(z, plot = TRUE) :
time series must have at least two observations

However, my data is a 2 observation and if a window a sliding window using loops it actually work perfectly (but obviously take no less than an hour to finish executing). here is a head of my data

 head(z)
  timestamp        dt
1  16.25035 16.250352
2  16.45870  0.208350
3  16.45914  0.000441
4  16.45914  0.000001
5  16.45915  0.000002
6  16.45915  0.000002

I am wondering if the problem come from the runner function and if you have a solution.

Thank you!

Note: I tried to read z with read_tsv, read.table,... no one of them worked

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.