trim_and_make_blanks_NA | R Documentation |
Trims the white space on both sides of strings in a character vector and
replaces blank values (""
and " "
) with NA
for all columns in a data
frame that have a character class.
trim_and_make_blanks_NA(tbl)
tbl |
a data frame, the SDTM table |
This function should be applied as one of the first steps in the data process to ensure consistent handling of all strings.
a modified copy of the tbl
data frame
format_chars_and_dates()
df <- data.frame(one = c(" a", "", " "))
trim_and_make_blanks_NA(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.