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 to get 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 make the date in numeric format, and na still cannot be avoided.
Maddy source
share