date_month_year: Convert Dates to Full-Length Month & Year

Description Usage Arguments Details Value Author(s)

View source: R/panthr.r

Description

date_month_year converts date field values in DD-MMM-YY format to full-length or abbreviated month names and 4-digit years in YYYY format.

Usage

1

Arguments

date

A scalar or vector of length n and class character containing one or more date values in DD-MMM-YY format.

sep

A single, quoted string of class character specifying which punctuation, characters, or metacharacters are used to separate month and year. Defaults to a single space, or sep = " ".

abbreviate

A logical value (i.e. TRUE or FALSE) indicating whether to convert months to an abbreviated, 3-character format, e.g. "Aug." Defaults to FALSE.

Details

Because the warehouse year format is YY, dates prior to 1930 C.E. will automatically convert to post-2000 C.E.

Values passed to argument date = which are not in DD-MMM-YY format or contain unrecognized month abbreviations are coerced to NA (missing) values and a warning message is thrown.

Value

A scalar or vector of values of class character containing full-length or abbreviated month names, as well as a 4-digit year in YYYY format, separated per user-specified delimiters.

Author(s)

Jamison R. Crawford, Institutional Research Associate, Georgia State University


jamisoncrawford/panthr documentation built on March 9, 2020, 6:18 p.m.