format_chars_and_dates {sdtmval} | R Documentation |
Format date and character columns for SDTM tables
Description
Converts all date columns to character class and replaces all NA
values in
character/date columns with ""
.
Usage
format_chars_and_dates(tbl)
Arguments
tbl |
a data frame, the SDTM table |
Details
This function should be applied as one of the last steps in the data process
but before assign_meta_data()
.
Value
a modified copy of the tbl
data frame
See Also
Examples
df <- data.frame(
dates = as.Date(c("2017-02-05", NA)),
strings = c(NA_character_, "this"),
nums = c(1, NA)
)
format_chars_and_dates(df)
[Package sdtmval version 0.4.1 Index]