convert_to_date: convert_to_date

Description Usage Arguments Value

Description

Convert a character vector containing dates as substrings into a vector of the corresopding dates

Usage

1
2
convert_to_date(v, match_reg = "^[0-9]{4}-[0-9]{2}-[0-9]{2}",
  date_form = "%Y-%m-%d")

Arguments

v

character vector containing dates as substrings

match_reg

regular expression specifying the format of the dates contained within the substrings. Default is ^[0-9]4-[0-9]2-[0-9]2.

date_form

the date format to be used for conversion.

Value

A date vector the same length as v


HorridTom/clahrcnwlhf documentation built on May 7, 2019, 4:02 a.m.