make_na.data.frame | R Documentation |
Set elements to NA values using tidyselect specification. Don't use this function on columns of different modes at once. Defaults to choosing all character columns.
## S3 method for class 'data.frame'
make_na(.data, ..., vec = c("-", "", " ", "null", "NA", "NA_"))
make_na(.data, ..., vec = c("-", "", " ", "null", "NA", "NA_"))
.data |
data frame |
... |
tidyselect. Default selection: all chr cols |
vec |
vector of possible elements to replace with NA |
data frame
# easily set NA values. blank space and empty space are default options
tibble::tibble(x = c("a", "b", "", "d", " ", "", "e")) %>%
make_na()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.