Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- head(df)
- # A tibble: 6 x 7
- # Groups: BinnedTime [1]
- Sensor Date Time calCO2 DeviceTime cuts BinnedTime
- <fctr> <date> <time> <dbl> <dttm> <fctr> <chr>
- 1 N1 2019-02-12 13:24 400 2019-02-12 13:24:02 (0,10] 2019-02-12 13:24:02
- 2 N1 2019-02-12 13:24 400 2019-02-12 13:24:02 (0,10] 2019-02-12 13:24:02
- 3 N1 2019-02-12 13:24 400 2019-02-12 13:24:03 (0,10] 2019-02-12 13:24:03
- 4 N2 2019-02-12 13:24 400 2019-02-12 13:24:03 (0,10] 2019-02-12 13:24:02
- 5 N3 2019-02-12 13:24 400 2019-02-12 13:24:03 (0,10] 2019-02-12 13:24:02
- 6 N3 2019-02-12 13:24 400 2019-02-12 13:24:05 (0,10] 2019-02-12 13:24:04
- df %>%
- group_by(Sensor)%>%
- group_by(BinnedTime = cut(DeviceTime, breaks="30 sec")) %>%
- summarize(Concentration = mean(calCO2))
Add Comment
Please, Sign In to add comment