Skip to content
Prev 5784 / 15274 Next

Xts, Zoo Error: "number of items to replace not multiple of replacement length"

Brian, 
thanks for your email. Sorry for not providing an reproducible example. But your guess was already spot on. The error was caused by NA's in the data. Once I've taken them out it works fine.

Thanks again!!

Wolfgang Wu



----- Urspr?ngliche Mail ----
Von: Brian G. Peterson <brian at braverock.com>
An: Wob Wu <wobwu22 at yahoo.de>
CC: R-SIG-Finance at stat.math.ethz.ch
Gesendet: Dienstag, den 9. M?rz 2010, 14:27:55 Uhr
Betreff: Re: [R-SIG-Finance] Xts, Zoo Error: "number of items to replace not multiple of replacement length"

You haven't provided a reproducible example, per the posting guide.  
This makes it difficult to help you.

This error usually results from NA's or a function failing to return.  
Look at your data, and see if the replaced series has problems.

Also, given that this question really has nothing to do with finance 
(though it does purport to use xts and zoo) it probably belonged on 
R-Help, where you would likely have also been told to do your homework 
and provide a reproducible example.

   - Brian
Wob Wu wrote: