My data,
Id|date1|date2
1|2008-10-01|NA
1|NA|2008-10-02
1|NA|2008-10-03
2|2008-10-02|NA
2|NA|2008-10-03
I want output this way,
Id|date1|date2|date3
1|2008-10-01|2008-10-02|2008-10-03
2|2008-10-02|2008-10-03
I tried using aggregate and dcast but they are making date into numeric format and na's are still not avoided.