I have a data frame that looks something like this
| Player | Surface |
|---|---|
| Mike | Grass |
| Mike | Concrete |
| Mark | Clay |
| Mike | Clay |
| Mark | Clay |
I want to make another data frame which would like something like this
| Player | Grass | Concrete | Clay |
|---|---|---|---|
| Mike | 1 | 1 | 1 |
| Mark | 0 | 0 | 2 |
I found some old threads and using a reshape package but I couldn't quite figure out how exactly it is used.
Any help is appreciated.