Hi!
In short, I have data where I need to reassign session numbers that are standardized across participants. Here is what I have to work with:
- Each participant has a different "session_id" number. These look like 200, 201, 203, etc.
- Each participant's session numbers start with a different and arbitrary baseline number because of the way the data was stored on our server (not my choice). Some numbers are as above with 200, 201, 203, while others are 1000, 1001, 1002. So the simplest solution would be aligning these so that they are standardized.
There must be a simple solution that I'm missing, probably some kind of simple function that subtracts the maximum value for session_id per participant from the minimum value and then adds 1. Can anyone help me with a loop here? A brute force, non-looped version would also be very helpful.
Please and thank you! I hope everyone is well and safe.