Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

head(convert_data_to_numeric(iris))

parameters

Processing of Model Parameters

v0.13.0
GPL-3
Authors
Daniel Lüdecke [aut, cre] (<https://orcid.org/0000-0002-8895-3206>, @strengejacke), Dominique Makowski [aut] (<https://orcid.org/0000-0001-5375-9967>), Mattan S. Ben-Shachar [aut] (<https://orcid.org/0000-0002-4287-4801>), Indrajeet Patil [aut] (<https://orcid.org/0000-0003-1995-6531>, @patilindrajeets), Søren Højsgaard [aut], Zen J. Lau [ctb], Vincent Arel-Bundock [ctb] (<https://orcid.org/0000-0003-1995-6531>, @vincentab), Jeffrey Girard [ctb] (<https://orcid.org/0000-0002-7359-3746>, @jeffreymgirard)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.