What I want to do is calculate the mean when I have more than one observation with the same ID, and the median when there is only one observation with the same ID.