A common use case in R (at least for me) is identifying observations in a data frame that have some characteristic that depends on the values in some subset of other observa
For the specific problem posed !rev(duplicated(rev(raw$WorkerId))) or better, following Charles' advice, !duplicated(raw$WorkerId, fromLast=TRUE)
!rev(duplicated(rev(raw$WorkerId)))
!duplicated(raw$WorkerId, fromLast=TRUE)