Hi, I have an id variable, and I have multiple observations per id (patients with multiple specimens). I want to create a new ID variable containing 1 for the first ID, 2 for the second, and so on. I have a date variable. This in preparation for transposing the dataset to have one row per patient with columns for the variables related to specimen 1, specimen 2, etc. Open to ideas of better ways to do this, but I was going to use the new ID variable as my prefix.
... View more