Converts non-factor/non-numeric variables in a data frame to factor/numeric. Stores information to revert back.
convert(X, check = FALSE)
A list with the following elements: X
is the converted data frame,
vars
, types
, classes
are the names, types and classes of the
converted variables. Finally, bad
names variables in X
that should
have been converted but could not.
A data frame.
If TRUE
, the function checks if the converted columns can be
reverted without changes.