Open eguidotti opened 2 years ago
Thanks for the report!
I also noticed that rollmean()
is using align = "center"
instead of align = "right"
like rollapply.xts()
does by default. That's because there isn't a rollmean.xts()
method for the rollmean()
generic to dispatch, so it dispatches to rollmean.zoo()
, and it uses align = "center"
by default. So we probably also need xts methods for 'rollmean', 'rollsum', 'rollmedian', and 'rollmax'.
That would be awesome!
Description
The function
rollmean
fails when there are missing values in multi-columnxts
object andk = nrow(x)
.Expected behavior
I'd expect that
rollmean
works also with missing values as in the example belowMinimal, reproducible example
Session Info