R: Factorize one variable in data frame -
i have r data frame variables stored numeric categorical. how convert 1 specific column's data type of existing data frame numeric factor?
you can use:
dat$col <- as.factor(dat$col) where dat name of data frame , col name of column.
Comments
Post a Comment