powered by
Converts all date columns to character class and replaces all NA values in character/date columns with "".
NA
""
format_chars_and_dates(tbl)
a modified copy of the tbl data frame
tbl
a data frame, the SDTM table
This function should be applied as one of the last steps in the data process but before assign_meta_data().
assign_meta_data()
trim_and_make_blanks_NA()
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)
Run the code above in your browser using DataLab