I am looking for a function to repeat the following exercise. I have a large dataset p in which each row correspond to a patient. Each patient has dates corresp
p