Re: [R] Help

From: <>
Date: Wed, 27 Apr 2011 09:28:19 -0500

Thanks a lot Jim, Dennis.
Jim, actually where "dots" were I meant "etcetera" or "similar data". ;) My output is close to that one Dennis proposed with function aggregate, but i would like to keep the column var2 and the rest of columns with the unique value corresponding to var1 greatest value, So suppose the example is:

  var1    var2         varN
  122     nnn1         1
  213     nnn2        2
  422     nnn4        2
  432     nnn5        3
  441     nnn6        4
  550     nnn7        4
  500     nnn8        4

The output were:

 var1    var2         varN
  122     nnn1        1
  635     nnn4        2
  432     nnn5        3
  550     nnn7        4

Maybe thats the reason for what I want to keep the "indexes" where the conditions are satisfied ( unique varN, sum of var1 were varN are the same, and value of var1 that is the greatest relative to the others same-VarN values).

Thanks for your help!
Chriss Pal.

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 27 Apr 2011 - 14:35:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Apr 2011 - 15:00:33 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive