get_standardized_data {catalytic} | R Documentation |
Standardize Data
Description
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.
Usage
get_standardized_data(data, na_replace = stats::na.omit)
Arguments
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 |
Value
A data frame where columns have been converted to numeric or factor types, and NA values have been replaced according to the method specified.