Binning data in one of the columns of a dataframe(Using R)
Use cut:

&gt; df = data.frame(v=sample(1:60,1000,TRUE))
&gt; df$cat = cut(df$v,c(-Inf,6,12,Inf))
&gt; table(df$cat)

 (-Inf,6]    (6,12] (12, Inf] 
       97        92       811 


Also, simple R questions are better asked on StackOverflow.