powered by
Replaces dates with word equivalents.
replace_date(x, pattern = NULL, replacement = NULL, ...)
The text variable.
Character date regex string to be matched in the given character vector.
A function to operate on the extracted matches or a character string which is a replacement for the matched pattern.
ignored.
Returns a vector with the pattern replaced.
# NOT RUN { x <- c( NA, '11-16-1980 and 11/16/1980', "and 2017-02-08 but then there's 2/8/2017 too" ) replace_date(x) replace_date(x, replacement = '<<DATE>>') # }
Run the code above in your browser using DataLab