View source: R/convert_numeric_to_date.R
convert_numeric_to_date | R Documentation |
Convert numeric to date
convert_numeric_to_date(data, target_columns, ref_date, forward = TRUE)
data |
The input data frame or linelist |
target_columns |
A vector of columns names to be converted from numeric
to date. When the input data is a |
ref_date |
A reference date. This can also be a character string with the name of the reference column. |
forward |
A Boolean to indicate whether the counts started after the reference date (TRUE) or not (FALSE). The default is TRUE. |
A data frame where the column of interest are updated
data <- readRDS(system.file("extdata", "test_df1.RDS", package = "cleanepi"))
data <- convert_numeric_to_date(
data = data,
target_columns = "recruted_on_day",
ref_date = as.Date("2022-10-13"),
forward = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.