Am 08.06.2010 16:52, schrieb Erin Hodgess: > > I would like to set up 3 time series; one for dog, one for cat, one > for tree, such that each runs from 1/1/2000 to 1/3/2000, with 0 if > there is no entry for the day. > > >
Before using zoo or zooreg you should transform your data.frame as such as that you have one column for each time series you want to have afterwards. have a look at ?reshape to do so. little example: test<-data.frame(date=c("2001/01/01","2001/01/01","2001/01/02","2001/01/02"),animal=c("dog","cat","dog","cat"),data=1:4) test.w<-reshape(test,idvar="date",timevar="animal",direction="wide") test.w then you can do the zoo stuff, e.g. with ?zooreg if you have a "regular" series. It will transform automatically into a multiple time series. hth Stefan ______________________________________________ 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.