rounddate: Round a date to the nearest unit

View source: R/primitives.R

rounddateR Documentation

Round a date to the nearest unit

Description

Round a date to the nearest unit

Usage

rounddate(x, unit = c("day", "week", "month", "year"))

Arguments

x

An atomic vector.

unit

Time unit to round to.

Value

A Date vector.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.