varClass: Extract Variable Types from a Data Frame

View source: R/varClass.R

varClassR Documentation

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)

Arguments

x

A data frame with variables in the columns.

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.

Note

This function is used internally by missForest and mixError.

Author(s)

Daniel J. Stekhoven [aut, cre]

See Also

missForest, mixError, nrmse

Examples

data(iris)
varClass(iris)

## We have four continuous and one categorical variable.

missForest documentation built on Nov. 5, 2025, 6 p.m.