Extract Variable Types from a Dataframe
'varClass' returns the variable types of a dataframe. It is used internally in several functions of the 'missForest'-package.
varClass(x)
x |
data frame with variables in the columns. |
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.
This function is internally used by missForest
and mixError
.
Daniel J. Stekhoven, <stekhoven@stat.math.ethz.ch>
data(iris) varClass(iris) ## We have four continuous and one categorical variable.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.