View source: R/convert_to_numeric.R
convert_to_numeric | R Documentation |
When the function is invoked without specifying the column names to be converted, it automatically scans for columns containing exclusively missing, numeric, and character values. 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.
convert_to_numeric(data, target_columns = NULL, lang = c("en", "fr", "es"))
data |
The input data frame or linelist |
target_columns |
A vector of the target column names. When the input
data is a |
lang |
The text's language. Currently one of |
A data frame after the conversion process, wherein all the specified or detected columns have been transformed into numeric format.
dat <- convert_to_numeric(
data = readRDS(system.file("extdata", "messy_data.RDS",
package = "cleanepi")),
target_columns = "age",
lang = "en"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.