Guest User

Untitled

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