Learn R Programming

missRanger (version 2.1.1)

convert: Conversion of non-factor/non-numeric variables.

Description

Converts non-factor/non-numeric variables in a data frame to factor/numeric. Stores information to revert back.

Usage

convert(X, check = FALSE)

Arguments

X

A data frame.

check

If TRUE, the function checks if the converted columns can be reverted without changes.

Value

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.