[R] tidyverse: grouped summaries (with summerize)

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Mon Sep 13 23:22:09 CEST 2021


On Mon, 13 Sep 2021, Avi Gross via R-help wrote:

> Did I miss something?

Avi,

Probably not.

> The summarise() command is telling you that  you had not implicitly
> grouped the data and it made a guess. The canonical way is:
> ... %>% group_by(year, month, day, hour) %>% summarise(...)

After sending the message I saw the example using %>% and didn't realize
that it made a difference from the previous example.

> You decide which fields to group by, sometimes including others so they
> are in the output.

That's what I thought I did. I'll rewrite the script and work toward the
output I need.

Thanks,

Rich



More information about the R-help mailing list