Hi R experts,
I would like sort a vector by its values (1,2,2,3,3,3,3,4,4,5) and split them into three groups. There are ties in the vector so I need to deal with ties by average. Hence, it is not necessary to have equal group size. I guess that I could use rank(x,ties.method='average') and cut(x) but I am not sure how to put the functions together. Can any one help me out? Thanks.