Learn R Programming

tolBasis (version 1.0)

Dround: Date Round

Description

Date Round in a Dating

Usage

Dround(dte, dating=Daily)

Arguments

dte
a Date or POSIXt object
dating
a Dating object

Value

Returns the nearest date to the indicated one that belongs to the dating.

See Also

See also the functions Dfloor and Dceiling

Examples

Run this code
# Obtain the nearest first day of a month
Dround(Sys.Date(), Monthly)

Run the code above in your browser using DataLab