Convert character vector of dates into multiple legible formats.
Usage
epidate(x, format = "%m/%d/%Y", cal.dates = FALSE,
before = 7, after = 7, sunday = TRUE)
Arguments
x
character vector of dates to be converted
format
format of character vector of dates
cal.dates
Calendar dates that contains x, starting 7
days 'before' (default) until 7 days 'after' x
before
defines lower limit of cal.dates: default is 7
days before earliest date in x
after
defines upper limit of cal.dates: default is 7
days after latest date in x
sunday
first day of the week is either Sunday (default) or Monday
Details
Dates can come in many formats (e.g., November 12, 2001, 12Nov01,
11/12/2001, 11/12/01, 2001-11-12) and need to be converted into other
formats for data analysis, graphical displays, generating reports,
etc.
There is tremendous flexibility in converting any character vector
with sufficient information to be converted into a unique date. For
complete options for the format option see
strptime.