Re: [R] Aggregate time series from daily to monthly by date and site

2014-04-05 Thread Zilefac Elvis
Thanks, Rui. It works great. Atem. On Saturday, April 5, 2014 4:46 AM, Rui Barradas wrote: Hello, Maybe the following will do. dat <- structure(...) aggregate(dat[5:8], dat[c(1, 2, 4)], FUN = mean) Hope this helps, Rui Barradas Em 05-04-2014 06:37, Zilefac Elvis escreveu: > Hi, > > I hav

Re: [R] Aggregate time series from daily to monthly by date and site

2014-04-05 Thread Rui Barradas
Hello, Maybe the following will do. dat <- structure(...) aggregate(dat[5:8], dat[c(1, 2, 4)], FUN = mean) Hope this helps, Rui Barradas Em 05-04-2014 06:37, Zilefac Elvis escreveu: Hi, I have daily data arranged by date and site. Keeping the number of columns as there are, I will like t

Re: [R] Aggregate time series from daily to monthly by date and site

2014-04-04 Thread Zilefac Elvis
Hi, I have daily data arranged by date and site. Keeping the number of columns as there are, I will like to aggregate (FUN=mean) from daily to monthly the following data (only part is shown here) which starts in 1971 and ends in 1980. structure(list(Year = c(1971, 1971, 1971, 1971, 1971, 1971,

Re: [R] Aggregate time series from daily to monthly by date and site

2014-04-04 Thread Jeff Newmiller
You have been around long enough that we should not have to tell you how to provide data in a reproducible manner... read ?dput. --- Jeff NewmillerThe . . Go Live... DCN:Basic

[R] Aggregate time series from daily to monthly by date and site

2014-04-04 Thread Zilefac Elvis
Hi, I have daily data arranged by date and site. Keeping the number of columns as there are, I will like to aggregate (FUN=mean) from daily to monthly the following data (only part is shown here) which starts in 1971 and ends in 1980.     Year Month Day Site Sim001 Sim002 Sim003 Sim004 1   1971