This is for those moving to data.table >= 1.9.8
You have a data set of pet owners and names, but you suspect some repeated data has been captured.
library(data.table)
DT <- data.table(pet = c("dog","dog","cat","dog"),
owner = c("...