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

varClass

Extract Variable Types from a Dataframe


Description

'varClass' returns the variable types of a dataframe. It is used internally in several functions of the 'missForest'-package.

Usage

varClass(x)

Arguments

x

data frame with variables in the columns.

Value

a vector of length p where p denotes the number of columns in 'x'. The entries are "numeric" for continuous variables and "factor" for categorical variables.

Note

This function is internally used by missForest and mixError.

Author(s)

Daniel J. Stekhoven, <stekhoven@stat.math.ethz.ch>

See Also

Examples

data(iris)
varClass(iris)

## We have four continuous and one categorical variable.

missForest

Nonparametric Missing Value Imputation using Random Forest

v1.4
GPL (>= 2)
Authors
Daniel J. Stekhoven <stekhoven@stat.math.ethz.ch>
Initial release
2013-12-31

We don't support your browser anymore

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