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

convertDataFrameCols

Converts columns in a data frame to characters, factors or numerics.


Description

Converts columns in a data frame to characters, factors or numerics.

Usage

convertDataFrameCols(df, chars.as.factor = FALSE, factors.as.char = FALSE,
  ints.as.num = FALSE, logicals.as.factor = FALSE)

Arguments

df

[data.frame]
Data frame.

chars.as.factor

[logical(1)]
Should characters be converted to factors? Default is FALSE.

factors.as.char

[logical(1)]
Should characters be converted to factors? Default is FALSE.

ints.as.num

[logical(1)]
Should integers be converted to numerics? Default is FALSE.

logicals.as.factor

[logical(1)]
Should logicals be converted to factors? Default is FALSE.

Value

[data.frame].


BBmisc

Miscellaneous Helper Functions for B. Bischl

v1.11
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Initial release

We don't support your browser anymore

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