[R] obtaining first and last record for rows with same identifier

sms13+@pitt.edu sms13+ at pitt.edu
Tue May 24 20:27:32 CEST 2005


I have a dataframe that contains fields such as patid, labdate, labvalue.
The same patid may show up in multiple rows because of lab measurements on 
multiple days.  Is there a simple way to obtain just the first and last 
record for each patient, or do I need to write some code that performs that.

Thanks,
Steven




More information about the R-help mailing list