When I convert to a xts object, R changes the values from numbers to strings, which causes problems:
timeseries <- xts(timeseries,as.POSIXct(timeseries$Date))
timeseries <- timeseries[endpoints(timeseries,ts_ret_freq)]
This is the code in question. Why is this the case? It shouldnt be.
Thanks in advance.