On Wed, Jan 12, 2011 at 10:49 PM, BSanders <[email protected]> wrote: > > > I have missing data in my time series, but I have the appropriate date. How > do I pass on the time index to R? > > For example, my days look like this > "291 292 293 295 296 297" (I'm missing 294)
Try this: > library(zoo) > v <- c(291, 292, 293, 295, 296, 297) > z <- as.zoo(as.ts(zoo(v, v))) > z 291 292 293 294 295 296 297 291 292 293 NA 295 296 297 > > > time(z) [1] 291 292 293 294 295 296 297 > coredata(z) [1] 291 292 293 NA 295 296 297 -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
