Hi guys, I have a dataset that looks like this:
Patient ID | Age1 | Age 2 | Age3 | Age4 | Age5 |
1 | 65 | 60 | 45 | 50 | 24 |
2 | 30 | 66 | 82 | 71 | 58 |
3 | 29 | 45 | 18 | 10 | 31 |
How do I create a 6th column (Age_final) where Age_final is the highest value identified from the 5 columns. Please note that my dataset has hundreds of rows.
An ideal dataset will look like this:
Patient ID | Age1 | Age 2 | Age 3 | Age4 | Age5 | Age_final |
1 | 65 | 60 | 45 | 50 | 24 | 65 |
2 | 30 | 66 | 82 | 71 | 58 | 82 |
3 | 29 | 45 | 18 | 10 | 31 | 45 |