Guest User

Untitled

a guest
Oct 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. library (dplyr)
  2. start <- as.POSIXct("2018-05-18 00:00")
  3. tseq <- seq(from = start, length.out = 1440, by = "10 mins")
  4. observations <- data.frame(
  5. Time = tseq,
  6. Temp = sample(10:37,1440, replace = TRUE, set.seed(seed = 10)),
  7. Variable1 = sample(1:200,1440, replace = TRUE, set.seed(seed = 187)),
  8. Variable2 = sample(300:800,1440, replace = TRUE, set.seed(seed = 333))
  9. )
  10.  
  11. observations_short <- observations %>% filter (Time <= as.POSIXct ("2018-05-23 00:00", tz="CET") )
  12.  
  13. observations_9to5 <- observations %>% filter (Time >= as.POSIXct ("09:00", tz="CET") ) %>% filter (Time <= as.POSIXct ("17:00", tz="CET") )
Add Comment
Please, Sign In to add comment