[R-SIG-Finance] Irregularly Spaced Time Series
Brian G. Peterson
brian at braverock.com
Sat Mar 10 21:48:59 CET 2007
> On Saturday 10 March 2007 14:02, Rich Ghazarian wrote:
> > Brian,
> >
> > Thank you for your input.
> >
> > Here is what I get and I don't understand why? Thank you for your
> > help
> >
> > > Z <- read.zoo(na.exclude("pp.csv", sep = ",", format = "%d %b %Y"))
> >
> > V1
> > 1 01/12-03,0.1
> > 2 01/13-03,0.5
> > 3 01/14-03,0.3
> > 4 01/15-03,0.1
> > 5 01/19-03,0.284
> > 6 01/20-03,0.288
On Saturday 10 March 2007 14:34, Brian G. Peterson wrote:
> You haven't told us what the format of your CSV file is, but I suspect
> that your problem is with your format string. You need to tell zoo how
> to interpret the date column from your source CSV. Details in the zoo
> documentation.
Once you have the data into a zoo object and indexed correctly, you can
examine the other na.* methods for zoo, like na.locf or na.approx, or
look at the documentation for the aggregate function to coerce the
irregular source data into the type of series and frequency you need for
your analysis.
Regards,
- Brian
--
773-459-4973 mobile
http://braverock.com/brian/resume-quant.pdf
More information about the R-SIG-Finance
mailing list