Description Usage Arguments Value Examples
Replace NA values with replacement
.
1 | replace_na(vector, replacement, warn = TRUE)
|
vector |
Vector to replace NA values in. |
replacement |
Value to replace NAs with (must be a single element). |
warn |
Logical indicating whether to issue a warning message if no element is replaced. |
Vector
with all NA elements replaced by replacement
.
Note that factors will be releveled with the replacement values and levels no longer present in the factor may be lost.
1 | replace_na(c("a", "b", NA), "look at me")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.