roundSec: roundSec

Description Usage Arguments Author(s) Examples

View source: R/timePosixCt.R

Description

round times to given time interval

Usage

1
roundSec(x, sec = 180)

Arguments

x

vector of POSIXct, times to round

sec

rounding interval, default each 180 seconds, i.e. 3 minutes

Author(s)

Thomas Wutzler

Examples

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)

twMisc documentation built on May 31, 2017, 4:37 a.m.

Search within the twMisc package
Search all R packages, documentation and source code