Dear R People: I have the following code that I use to convert a monthly zoo object to a data.frame, and it works perfectly:
library(tseries) z <- get.hist.quote(instrument=inst1, start=start1,end=end1, quote=quot1,comp = "m") y <- as.ts(aggregate(z, as.yearmon, tail, 1)) y.df <- data.frame(y=y,time=time(y)) y.df$x <- ts(y.df[,1]) tsp(y.df$x) <- tsp(y.df[,2]) names(y.df) <- c("data","time","ts") z.df <- data.frame(ts=y.df$ts) Fair enough. Now I would like to take a daily or weekly zoo and convert that to a data frame. It will probably follow a similar pattern to what I have here, but I'm not sure how to do this. Any help would be much appreciated. thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.