Skip to content
Prev 76396 / 398502 Next

aggregate

How can I aggregate this data.frame to list the min and max date for
each unique id?
id     date
 1     2005-08-25
 2     2005-08-25
 3     2005-08-25
 1     2005-08-26
 2     2005-08-26
 3     2005-08-26
 1     2005-08-29
 2     2005-08-29
 3     2005-08-29

I want to get to this:
id    start              end
 1    2005-08-25    2005-08-29
 2    2005-08-25    2005-08-29
 3    2005-08-25    2005-08-29

I tried aggregate and aggregate.data.frame but the date column keeps
getting converted into a number.