Learn R Programming

midasml (version 0.1.11)

dateMatch: Match dates

Description

Change the date to the beginning of the month date.

Usage

dateMatch(x, y)

Value

changed date vector.

Arguments

x

date vector to match with y date vector.

y

date vector.

Author

Jonas Striaukas

Examples

Run this code
x <- seq(as.Date("2020-01-01"),as.Date("2020-12-01"), by = "day")
set.seed(100)
x <- x[-sample(1:336, 100)]
y <- seq(as.Date("2020-01-01"),as.Date("2020-12-01"), by = "month")
dateMatch(x,y)

Run the code above in your browser using DataLab