When the function is invoked without specifying the column names to be
converted, the target columns are the ones returned by the scan_data()
function. Furthermore, it identifies columns where the proportion of numeric
values is at least twice the percentage of character values and performs the
conversion in them.
Usage
convert_to_numeric(data, target_columns = NULL, lang = c("en", "fr", "es"))
Value
A data frame wherein all the specified or detected columns have been transformed into numeric format after the conversion process.
Examples
dat <- convert_to_numeric(
data = readRDS(
system.file("extdata", "messy_data.RDS", package = "cleanepi")
),
target_columns = "age",
lang = "en"
)