Question

na.locf(xts_ts, maxgap=240) doesn't seem to respect maxgap for xts timeseries. I think that for xts timeseries na.locf.xts is invoked (which doesn't document maxgap), and not na.locf which is from zoo.

Am I doing something wrong?

Should I convert the xts ts to a zoo ts, then call na.locf with maxgap and the convert back to xts?

Was it helpful?

Solution

maxgap is included in na.locf.xts on R-forge as of revision 553. Use install.packages("xts", repos="http://R-Forge.R-project.org") to get the latest revision from R-forge.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top