fix_date_df | R Documentation |
Tidies a dataframe
object which has date columns
entered via a free-text box (possibly by different users) and are therefore
in a non-standardized format. Supports numerous separators including /,-, or
space. Supports all-numeric, abbreviation, or long-hand month notation. Where
day of the month has not been supplied, the first day of the month is
imputed. Either DMY or YMD is assumed by default. However, the US system of
MDY is supported via the format
argument.
fix_date_df(
df,
col.names,
day.impute = 1,
month.impute = 7,
id = NULL,
format = "dmy",
excel = FALSE,
roman.numeral = FALSE
)
A dataframe
or tibble
object. Dependent on the type of
df
. Selected columns are of type Date
with the following
format yyyy-mm-dd
fix_date_char
which is similar to fix_date_df()
except can only be applied to character vectors.
data(exampledates)
fixed.df <- fix_date_df(exampledates, c("some.dates", "some.more.dates"))
fixed.df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.