Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top