I've been trying to reshape this long data into wide format by ID within excel with no luck. I tried using dcast but it did not give me the results I was expecting.
I've attached a csv of how the data is currently formatted in cells: (a1:c10), and cells: (f1:n4) is how I'd like it to be formatted. I tried in excel first, but have no experience with power query and thought perhaps reshape2 or dcast could do something similar.
In r I did:
olddata_wide$ID <- factor(olddata_wide$ID)
widedf <- dcast(df1, ID ~ paydate, value.var="Type")
This just gave me an output of dates.