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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -