I have a dataframe with the ID of sportmans, the test performed, the timepoint, and value for that measure.
Something like:
ID | Test | Timepoint | Value
01 A Hour2 434
01 A Hour4 234
01 A Hour8 5472
02 A Hour2 1.8
02 A Hour2 2342
02 A Hour4 452
02 A Hour8 234
03 A Hour2 457
03 A Hour4 429
03 A Hour8 4985
As you can see, there are two measures for Sportman02 Hour2.
That’s because the first measure was very low, Hence it’s repeated.
Is there a way of creating a new dataframe where I get only the highest value for a repeated timepoint for a given patient and test?
So in the example above I would get:
ID | Test | Timepoint | Value
01 A Hour2 434
01 A Hour4 234
01 A Hour8 5472
02 A Hour2 2342
02 A Hour4 452
02 A Hour8 234
03 A Hour2 457
03 A Hour4 429
03 A Hour8 4985