Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x <-80
- test <- seq(from=as.POSIXct('x - 1',format='%M'),to=as.POSIXct('x +
- 1',format='%M'),by='sec')
- # this doesn't actually work
- test <- seq(from=strptime(x - 1, format='%M'),
- to=strptime(x + 1, format='%M'),
- by='sec')
- tmp <- seq(strptime(paste((x-1)%/%60, (x-1)%%60, sep=":"), format="%H:%M"),
- strptime(paste((x+1)%/%60, (x+1)%%60, sep=":"), format="%H:%M"),
- by='sec')
- as.numeric(format(tmp, "%M.%S"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement