0
Daily_mean<-Half_hourly%>%
  group_by(Date) %>%
  summarise_if(is.numeric, mean, na.rm=TRUE)

enter image description here

Is there a good way to average each column in terms of the day step size?

AndrewGB
  • 16,126
  • 5
  • 18
  • 49
Kevin
  • 1
  • 2
    You were almost there, you just need to group by the final unit you want. eg `Half_hourly %>% mutate(Day = round.POSIXt(Date, "day")) %>% group_by(Day)` ... in general in the future provide data as a reproducible example (https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) instead of as a screenshot if you want people to actually be able to use your data to help – Sarah Feb 25 '22 at 03:21
  • Please share a reproducible dataset using the `dput` function. Here is how: https://youtu.be/3EID3P1oisg – Shawn Hemelstrand Feb 26 '22 at 01:41

0 Answers0