View source: R/handle_missing_values.R
| handle_missing_values | R Documentation |
Handles missing values (NA) in a data frame using one of several strategies: exclude rows, replace with a value, fill with column mean, fill with column median, or flag with an indicator column.
handle_missing_values(df, method = "exclude", replace_with = NULL)
df |
A data frame with potential missing values. |
method |
Method for handling missing values ('exclude', 'replace', 'mean', 'median', 'flag'). |
replace_with |
Optional; a value or named list to replace missing values with (used with 'replace' method). |
A data frame after handling missing values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.