I am trying to use the missForest package to impute missing data into a fairly large dataset.
missForest takes data in the form of a a data matrix with missing values. The columns correspond to the variables and the rows to the observations. Therefore, I converted my dataframe to a matrix, which inadvertently turned all of my categorical variables to numeric type.
Does anyone know how to assign a column of a matrix as a factor??
Thank you so much!!!