I have a list of people with employee ids, names and roles:
I would like to "collapse" these rows to the following:
I have an idea of how I might do this in Excel with Vlookup but my data set is too large for that. Any ideas how I could do it in Stata? Also, what would a process like this be called?
| ID | Name | Role |
| 1 | Jon | Chef |
| 1 | Jon | Waiter |
| 2 | Bill | Waiter |
| ID | Name | Chef | Waiter |
| 1 | Jon | 1 | 1 |
| 2 | Bill | 0 | 1 |

Comment