View source: R/utility_functions.R
na2empty | R Documentation |
Replace all instances of NA in character variable with empty string.
na2empty(x)
x |
A character vector. |
A character vector with NA values replaced with empty string.
unfactor
## Create character variable with missing values
ex1 <- c( 'A', NA, 'B', NA, 'C', NA )
ex1
## Replace NAs with empty string
ex1 <- na2empty( ex1 )
ex1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.