[R] by-group processing

David Huffer David.Huffer at csosa.gov
Fri May 8 16:57:15 CEST 2009


On Thursday, May 07, 2009 7:45 PM, David Freedman wrote:

 > ...how about:
 >   d=data[order(data$ID,-data$Type),]
 >   d[!duplicated(d$ID),]

Does the "-data$Type" argument to the order function work?

--
 David
 
 -----------------------------------------------------
 David Huffer, Ph.D.               Senior Statistician
 CSOSA/Washington, DC           david.huffer at csosa.gov




More information about the R-help mailing list