[R] Grouping

Judith Flores juryef at yahoo.com
Thu Jan 24 23:21:05 CET 2008


I need to group some subjects according to two
variables (var1, var2)

I have a data frame that looks something like this:

Subject   var1   var2   
1         400    150         
2         320    100     
3         580    600     
4         145    789     

   
  Each suject would fall into one of 2 categories ('A'
or 'B'). I want to find (and see) all the possible
combinations of letter assignment that exist, but
every combination needs to have an equal amount of
subjects categorized as 'A' or 'B'(eg. if I have 20
subjects there should be 10 assigned with letter 'A'
and 10 with letter 'B')

Thank you in advance for any hints,

Judith


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.



More information about the R-help mailing list