1 year ago
#332928
chrispbacon
Filter between specific time points and get average value for each
I'm relatively new to using R, so I'm hoping this is a relatively simple question.
I have two columns, one being 'Time' (in seconds) and the other being 'Power'(in Watts) during a 20-minute test. I am looking to take the average power at specific 20-second intervals of time at minutes 2, 4, 6, 8, 9, 10, 12, 14, 16, 18, and 20. So, for example, average power between time 100-120s, 220-240s etc.
I tried using a group_by function with intervals followed by a summarize function, but I don't seem to be getting the right values. I would also like to get the data put into a table that can be exported into an excel file.
Any help or links to help answer this would be appreciated!
r
moving-average
0 Answers
Your Answer