Re: [R] Need to aggregate large dataset by week...

2012-02-11 Thread John Kane
=list(xx$week), mean) library(reshape) mm <- melt(xx, id=c("week")) cast(mm, week ~ variable, mean) John Kane Kingston ON Canada > -Original Message- > From: revda...@gmail.com > Sent: Fri, 10 Feb 2012 04:55:44 -0800 (PST) > To: r-help@r-project.org > Su

[R] Need to aggregate large dataset by week...

2012-02-10 Thread danielrev
Hi all, I have a large dataset with ~8600 observations that I want to compress to weekly means. There are 9 variables (columns), and I have already added a "week" column with 51 weeks. I have been looking at the functions: aggregate, tapply, apply, etc. and I am just not savvy enough with R to fi