Description Usage Arguments Value Examples
This utility function is used to clean non-standard missing values.
Converts the supplied char_string (default = "") to NA
.
1 | char_to_na(dt, char_string = "")
|
dt |
A vector, matrix or data frame. |
char_string |
A character string. Default = "". |
A copy of the input with all target strings replaced by NA.
1 2 3 4 | char_to_na(c("foo", "", "bar"))
char_to_na(matrix(c("foo", "", "bar")))
char_to_na(data.frame(x = c("foo", ""), b = c("", "bar")))
char_to_na(data.frame(x = c("foo", "_"), b = c("_", "bar")), char_string = "_")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.