I have a large dataset containing many dates per participant. I want to creat a new variable containing the number of unique dates per participant. I have been trying to figure this out but it does not work. An example of how the dataset looks like you see below:

participant 1 - date.1 - date.2 - date.3 - date.4 ... date.412

participant 2 - date.1 - date.2 - date.3 - date.4 ... date.412

Dates are in the format: 31-oct-20

Some participants have only 10 dates, others have 412 dates

Any idea how I can create this new variable containing the number of unique dates?

More Miriam van der Velde's questions See All
Similar questions and discussions