id var1 var2 var3
1 0 5
1 5 5
1 2 5
2 1 1
How do I create var3 that is the maximum value of var1 within the same group of ID?