insp_replace_year_long: Replace Malformed Years in Inspections Data

insp_replace_year_longR Documentation

Replace Malformed Years in Inspections Data

Description

insp_replace_year_long() replaces numeric years which only have three digits, rather than the expected four (i.e. 202 instead of 2020). The replacement value is the current year. This function is intended for use inside insp_cast_chr_date() .

Usage

insp_replace_year_long(x, quiet = FALSE)

Arguments

x

A vector of dates

quiet

Should a warning be issued when malformed dates are detected?

Value

The corrected date vector

See Also

The calling function insp_cast_chr_date() , as well as higher-level functions convert_to_date() and insp_prep_data()


jesse-smith/covidReport documentation built on Aug. 3, 2024, 4:52 p.m.