I have a dataset that looks something like this:
Name Result
X1 Red
X2 Blue
X2 Green
X3 Red
X2 Yellow
X3 Blue
and I would like the values in the "Name" column to turn into their own columns with their corresponding "Result" value
X1 X2 X3
Red NA NA
NA Blue NA
NA Green NA
NA NA Red
NA Yellow NA
NA NA Blue
I've looked into some options in tidyr (such as separate), but I haven't had any luck.
any help is appreciated. thank you :)