Re: [R] Formatting outputs:(chronological object)

2009-10-07 Thread jim holtman
try this -- the example you provided did not work, so I had to hack together an example: library(chron);library(zoo) date<- seq(as.Date("1990-01-01"), as.Date("2000-12-31"), by = 1) obs<-rnorm(length(date), mean = 10, sd = 2.5) monthly<- function(date) as.Date(as.yearmon(date)) obs <- tapply(obs

[R] Formatting outputs:(chronological object)

2009-10-07 Thread Subodh Acharya
Hello everyone, I have a data generated in a way similar to the following library(chron);library(zoo) date<- seq(as.Date("1990-01-01"),, as.Date("2000-12-31"), by = 1) obs<- zoo(rnorm(length(date), mean = 10, sd = 2.5), order.by = date) monthly<- function(date) as.Date(as.yearmon(Date)) result<-