Re: [R] Help with read.zoo and transform

2007-12-24 Thread Gabor Grothendieck
zoo objects are intended to represent time series and are based on vectors and matrices, like ts objects, not data frames. See ?zoo Create your new columns as numeric variables: > library(zoo) > library(chron) # need chron 2.3-16 for month.day.year > z <- zoo(matrix(1:24, 6, 4), Sys.Date() + seq(

[R] Help with read.zoo and transform

2007-12-24 Thread Alex Park
R I get a daily feed of data over the internet that I keep in various .csv files. I have built a function that reads that data into R for me: getMarketData<-function(market) { library(zoo) pathname<- "C:/DATA/" files<-c("AN_REV.csv","AX_REV.csv","BN_REV.csv") ma