Learn R Programming

dateutils (version 0.1.5)

first_of_month: First of month

Description

Return the first day of the month for each date in `dates`

Usage

first_of_month(dates)

Arguments

dates

A sequence of dates in `as.Date()` format

Value

First day of the month

Examples

Run this code
# NOT RUN {
dates <- seq.Date(from = as.Date("2020-09-11"),
                  by = "day", length.out = 10)
first_of_month(dates)
# }

Run the code above in your browser using DataLab