lattice:::equal.count may be what you want. 2009/5/4 utkarshsinghal <utkarsh.sing...@global-analytics.com>: > Hi All, > > I have vector of length 52, say, x=sample(30,52,replace=T). I want to > sort x and split into five *nearly equal groups*. Note that the > observations are repeated in x so in case of a tie I want both the > observations to fall in same group. > This seems a very common task to do, but still I couldn't find an R > function to do this. Any help would be highly appreciated. > > Regards > Utkarsh > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
-- HUANG Ronggui, Wincent PhD Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.