I would like to smooth a zoo time series (a zoo object) in R. I've already performed the classic moving average smoothing, but I would like to try other methods, such as the kernel smoothing or others, but nothing seems to work, because the function returns a list and NOT a zoo time series! So, when I try to plot it, I can't.
data.smoothKER <- ksmooth(time(data), data, "normal", bandwidth = 3)
plot(data.smoothKER, datazoo)
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ
What can I do?