Description Usage Arguments Value Examples
Removing and/or changing NA values Function for changing blank or non-NA values in a given data frame into NA values if not yet changed to NA, then removing the NA values from the data frame in one function. This function is beneficial for data frames being used with the 'tidyverse' package, but can also be used in base R for missing values.
1 | change_na_rm(ants, "None")
|
data |
A data frame containing missing, non-NA, or NA values. |
characterName |
The non-NA or missing value to be replaced by NA. if this argument is left blank, the function will only remove the NA values that are already present in the data frame. |
The new data frame with missing, non-NA, or NA values replaced (if applicable) and removed.
1 2 | change_na_rm(combined)
change_na_rm(butterfly, "Plebejus icarioides")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.