product10 | product6 | industry | total | industry_new |
0302110010 | 030211 | 112511 | 300 | 112511 |
0302110090 | 030211 | 114111 | 100 | 112511 |
Assigning new variable using max value of a different variable
Hi. I have a dataset which looks like the following. I want to create a variable industry_new such that for each value in product6, it takes the value of the variable industry associated with the max value under the variable total. One example is illustrated below. Thank you!
0 Response to Assigning new variable using max value of a different variable
Post a Comment