I have a data set with several time assessments for each participant. I want to select the last assessment for each participant. My dataset looks like this:
Another option in base: df[rev(rownames(df)),][match(unique(df$ID), rev(df$ID)), ]
df[rev(rownames(df)),][match(unique(df$ID), rev(df$ID)), ]