Description Usage Arguments Author(s) Examples
round times to given time interval
1 | roundSec(x, sec = 180)
|
x |
vector of POSIXct, times to round |
sec |
rounding interval, default each 180 seconds, i.e. 3 minutes |
Thomas Wutzler
1 2 3 4 5 6 | midnight <- as.POSIXct("2014-12-09 00:00:00")
testTimes <- midnight +60*c(-1.51,-1.5,0,1.49,1.5,1.51,4.49)
testTimes
(rTestTimes <- roundSec(testTimes))
# getDaysMinute(rTestTimes)
roundSec(testTimes, sec=5*60)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.