문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top