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
remove <- with(raw, as.logical(ave(Iteration, WorkerId, FUN=function(x) c(rep(TRUE, length(x)-1), FALSE)))))