Average measurements from seconds to minutes

Hi all, I have recorded my measurements in 30 seconds intervals (device max interval). I am trying to average the observations at least for 15 minutes intervals.

library(dplyr)
summarize(group_by(mp_4_1316,cut(mip_4_1316$Time, breaks="15 min"),mean(pm25))

but I am getting the following error message
Error: unexpected symbol in:summarize(group_by(mp_4_1316,cut(mip_4_1316$Time, breaks="15 min"),mean(pm25))

How can I average this into the desired interval?

Thanks

I'm not sure, but in your code, you have 4 openings parenthesis ( and only 3 closings). Perhaps you need to add one more closing before mean(pm25).
If it doesn't help, please provide a reprex with a sample of your data. You can provide sample data using function dput() and coping the output from the console.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.