Skip to content
Prev 70307 / 398506 Next

obtaining first and last record for rows with same identifier

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