Did some extensive searching but couldn't find a solution. I have a dataframe that looks like this:
FAC | NUM | VAL
A | 1 | 100
A | 2 | 200
B | 1 | 300
B | 2 | 200
And I want it to look like this:
NUM | A | B
1 | 100 | 300
2 | 200 | 200
Is there any simple way to use mutate() in dplyr (potentially in combination with base R) to achieve this goal?
Any support would be appreciated.