I have data in the following format:
| Year | Variable | 
|---|---|
| 2010 | F | 
| 2010 | N | 
| 2012 | F | 
And I want to format it as:
| Year | F | N | 
|---|---|---|
| 2010 | 1 | 1 | 
| 2012 | 1 | 0 | 
I know you can do this using dplyr pipes (%>%) but I just can't figure out the order of operations.
Thanks for any insight.