Learn R Programming

missForest (version 1.6.1)

varClass: Extract Variable Types from a Data Frame

Description

varClass returns the variable types of a data frame. It is used internally in several functions of the missForest package.

Usage

varClass(x)

Value

A character vector of length \(p\), where \(p\) is the number of columns in x. Entries are "numeric" for continuous variables and "factor" for categorical variables.

Arguments

x

A data frame with variables in the columns.

Author

tools:::Rd_package_author("missForest")

See Also

missForest, mixError, nrmse

Examples

Run this code
data(iris)
varClass(iris)

## We have four continuous and one categorical variable.

Run the code above in your browser using DataLab