varClass: Extract Variable Types from a Dataframe

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/varClass.R

Description

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

Usage

1

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, <[email protected]>

See Also

missForest, mixError, nrmse

Examples

1
2
3
4
data(iris)
varClass(iris)

## We have four continuous and one categorical variable.

Example output

Loading required package: randomForest
randomForest 4.6-14
Type rfNews() to see new features/changes/bug fixes.
Loading required package: foreach
Loading required package: itertools
Loading required package: iterators
[1] "numeric" "numeric" "numeric" "numeric" "factor" 

missForest documentation built on May 1, 2019, 8 p.m.