Learn R Programming

QuantTools (version 0.5.7.1)

round_POSIXct: Round POSIXct timestamps

Description

Round POSIXct timestamps

Usage

round_POSIXct(x, n = 1, units = c("secs", "mins", "hours", "days"),
  method = round)

ceiling_POSIXct(x, n = 1, units = c("secs", "mins", "hours", "days"))

trunc_POSIXct(x, n = 1, units = c("secs", "mins", "hours", "days"))

Arguments

x

POSIXct vector

n

number of units to round off

units

to round off to

method

round method, see Round

Details

Rounds POSIXct vector with specified method.