get_standardized_data | R Documentation |
This function standardizes a dataset by converting columns to numeric or factor types and replacing NA values. For continuous variables, NA values are replaced with either a specific numeric value or a computed statistic. For categorical variables, NA values are replaced with the mode of the column.
get_standardized_data(data, na_replace = stats::na.omit)
data |
A data frame to be standardized. |
na_replace |
A function or numeric value used to replace NA values. If a function, it should take a vector and return a replacement value.
If a numeric value, it is used directly to replace NA values in continuous columns.
The default is |
A data frame where columns have been converted to numeric or factor types, and NA values have been replaced according to the method specified.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.