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
The idiomatic data.table way is:
data.table
require(data.table) unique(dt, by = c("y", "x")) # y x z # 1: a 1 1 # 2: a 2 2 # 3: b 3 4 # 4: b 2 5 # 5: b 1 6