Create categorical variable in R based on range

x <- rnorm(100,10,10)
cut(x,c(-Inf,0,5,6,10,Inf))

Leave a Comment