[R] Calculate daily means from 5-minute interval data [RESOLVED]

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Wed Sep 1 16:30:44 CEST 2021

On Tue, 31 Aug 2021, Jeff Newmiller wrote:

> Never use stringsAsFactors on uncleaned data. For one thing you give a
> factor to as.Date and it tries to make sense of the integer
> representation, not the character representation.


Oops! I had changed it in a previous version of the script and for got to
change it back again. Fixed

> dtad <- (   dta
>        %>% group_by( sampdate )
>        %>% summarise( exp_value = mean(cfs, na.rm = TRUE)
>                     , Count = n()
>                     )
>        )

Thank you. Now I understand how to use dplyr's summarize().

Best regards,


More information about the R-help mailing list