Phil Spector wrote:
>
>
> For chron objects:
>
> aggregate(thedata$value,list(hour=hours(thedata$date)),mean)
>
>
Ok, thanks, that's what I need. Now it seems so easy...
Could you tell me why we write... ?
aggregate(thedata$value,list(hour=hours(thedata$date)),mean)
instead of just
ag
Hi:
On Wed, Aug 18, 2010 at 4:43 PM, skan wrote:
>
> Hi
>
>
> Usually "aggregate" is used to calculate things such as the sum of all data
> on the first day, the sum next day, and so on.
> But how can I calculate the mean of the first hour of all days, the mean of
> the second hour of all days,
Skan -
I'll answer this question:
"how can I calculate the mean of the first hour of all days, the mean of
the second hour of all days, and so on."
Since you didn't include a reproducible example, I have to make
some assumptions. Since you are interested in hours, I'm guessing
your dates are
Hi
Usually "aggregate" is used to calculate things such as the sum of all data
on the first day, the sum next day, and so on.
But how can I calculate the mean of the first hour of all days, the mean of
the second hour of all days, and so on. ???
That's
Most examples:
today at 1am + today at 2
4 matches
Mail list logo