I have a dataframe with a column of integers that I would like to use as a reference to make a new categorical variable. I want to divide the variable into three groups and
x <- rnorm(100,10,10) cut(x,c(-Inf,0,5,6,10,Inf))