Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. x <-80
  2.  
  3. test <- seq(from=as.POSIXct('x - 1',format='%M'),to=as.POSIXct('x +
  4. 1',format='%M'),by='sec')
  5. # this doesn't actually work
  6.  
  7. test <- seq(from=strptime(x - 1, format='%M'),
  8. to=strptime(x + 1, format='%M'),
  9. by='sec')
  10.  
  11. tmp <- seq(strptime(paste((x-1)%/%60, (x-1)%%60, sep=":"), format="%H:%M"),
  12. strptime(paste((x+1)%/%60, (x+1)%%60, sep=":"), format="%H:%M"),
  13. by='sec')
  14. as.numeric(format(tmp, "%M.%S"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement