Learn R Programming

ecb (version 0.4.4)

convert_dates: Format date variable retrieved from the SDW into a proper date variable

Description

Format date variable retrieved from the SDW into a proper date variable

Usage

convert_dates(x)

Value

A date-formatted vector

Arguments

x

A vector of dates

Examples

Run this code
convert_dates(c("2024-01", "2024-02", "2024-03"))
convert_dates(c("2023-Q4", "2024-Q1"))

# \donttest{
hicp <- get_data("ICP.M.U2.N.000000.4.ANR")
if (!is.null(hicp)) {
  hicp$obstime <- convert_dates(hicp$obstime)
  str(hicp)
}
# }

Run the code above in your browser using DataLab