Learn R Programming

rccdates (version 1.0.0)

as.yyww: Coerce yyww-variable to a valid date.

Description

Coerce yyww-variable to a valid date.

Usage

as.yyww(x, format_check = TRUE)
as.yyyyww(x, format_check = TRUE)

Arguments

x
a vector that can be coerced to a date of the form yV (yyww) or YV (yyyyww)
format_check
Should the format of x be checked to be in correct format before we try to change it? TRUE by default. Set to FALSE if the format is already checked outside the function to avoid multiple checks (that could be time consuming for big data sets).

Value

a date vector