[R] No years() function?

2007-03-07 Thread Sérgio Nunes
Hi, I'm trying to aggregate date values using the aggregate function. For example: aggregate(data,by=list(weekdays(LM),months(LM)),FUN=length) I would also like to aggregate by year but there seems to be no years() function. Should there be one? Is there any alternative choice? Also, a hours()

Re: [R] No years() function?

2007-03-07 Thread Ben Bolker
Sérgio Nunes snunes at gmail.com writes: Hi, I'm trying to aggregate date values using the aggregate function. For example: aggregate(data,by=list(weekdays(LM),months(LM)),FUN=length) I would also like to aggregate by year but there seems to be no years() function. Should there be

Re: [R] No years() function?

2007-03-07 Thread José Rafael Ferrer Paris
From the help of weekdays: Note: Other components such as the day of the month or the year are very easy to compute: just use 'as.POSIXlt' and extract the relevant component. Yet another option: help(package=chron) JR El mié, 07-03-2007 a las 15:35 +, Sérgio Nunes