I have a table like this:
Type, ID, Name, Time
a, 1, abc, 2017-01-01 00:00:00
b, 1, abc, 2017-01-01 00:01:00
a, 1, abc, 2017-01-01 00:02:00
b, 1, abc, 2017-01-01 00:03:00
And I'm trying to convert to wide format like this:
ID, Name, a, b
1, abc, 2017-01-01 00:00:00, 2017-01-01 00:01:00
1, abc, 2017-01-01 00:02:00, 2017-01-01 00:03:00
I'm using the spread function from tidyr, but how do I keep the ID and name column?