Skip to content

Chainging monthly data to daily data

3 messages · Megh Dal, Gabor Grothendieck

#
Hi, I have a zoo object with monthly frequency :

library(zoo)
dat <- zooreg(rnorm(50), as.yearmon("2000-01-01"), frequency=12)

Now I want to make a zoo object with daily frequency from "dat" wherein
value for a each day for a particular month will be value of "dat" at that
particular month.

Is there any easy way to do that?

Thanks,
#
In the mean time, I have done some research and found following link here :
https://stat.ethz.ch/pipermail/r-sig-finance/2009q3/004677.html

Although this is close to my problem, I am not interested in any sort of
interpolation, rather fill the NA positions with corresponding month's
price. Any idea please?
Megh wrote:

  
    
#
Repeat the code you found but use na.locf in place of na.spline.
On Fri, Jan 1, 2010 at 4:57 PM, Megh <megh700004 at yahoo.com> wrote: