convert_data_to_numeric: Convert data to numeric
Description
Convert data to numeric by converting characters to factors and factors to either numeric levels or dummy variables.
Usage
convert_data_to_numeric(x, dummy_factors = TRUE, ...)data_to_numeric(x, dummy_factors = TRUE, ...)
Arguments
x
A data frame or a vector.
dummy_factors
Transform factors to dummy factors (all factor levels as different columns filled with a binary 0-1 value).
...
Arguments passed to or from other methods.
Value
A data frame of numeric variables.
Examples
Run this code# NOT RUN {
head(convert_data_to_numeric(iris))
# }
Run the code above in your browser using DataLab