I have a data.table and want to pick those lines of the data.table where some values of a variable x are unique relative to another variable y
It\'s possible to get
Thanks to dplyR
library(dplyr) col1 = c(1,1,3,3,5,6,7,8,9) col2 = c("cust1", 'cust1', 'cust3', 'cust4', 'cust5', 'cust5', 'cust5', 'cust5', 'cust6') df1 = data.frame(col1, col2) df1 distinct(select(df1, col1, col2))