Guest User

Untitled

a guest
Jun 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Time Concentration
  2. 12:31 128000
  3. 12:33 120500
  4. 12:34 105000
  5. 12:35 100000
  6. 12:37 115000
  7. 12:38 120000
  8.  
  9.  
  10.  
  11. setwd('C:\Users\.....’)
  12. cp = read.csv(‘……...csv',header = T)
  13. head(cp)
  14.  
  15. cp$Time = as.POSIXct(cp$Time, format = "%H:%M:%S", tz = “America/New_York”)
  16.  
  17. cp.zoo = zoo(cp[,-1], as.POSIXlt(cp[,1], format = "%H:%M:%S"))
  18. frame.zoo = zoo(NA,seq(start(cp.zoo), end(cp.zoo), by = "min"))
  19. df = data.frame(Time = as.POSIXlt(index(frame.zoo), format = "%H:%M:%S"))
  20. merging = merge(df, cp, all = TRUE)
Add Comment
Please, Sign In to add comment