Hello,
How can I remove the SKU duplicated by RUT?
D <- data.frame(One = 1:30,
ID = c(1,1,1,1,1,1,1,1,1,
2,2,2,2,2,
3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4),
SKU = c("A1","A2", "A3", "A4", "A5", "A6","A7", "A8", "A9",
"A1", "A2", "A3", "A3", "A3",
"A1","A2", "A3", "A3", "A3", "A3","A3", "A3", "A3",
"A1","A2", "A3", "A4", "A5", "A6","A7"))
in ID 2, remove two SKU A3
in ID 3, remove six SKU A3
NOTE: I tried with this: D[!duplicated(D, keyby = SKU[c("ID",)]),]
But still apprears SKU duplicated by ID, maybe because the real dataset has 10 columns?
NOTE: I tried: D[!duplicated(D$SKU, keyby = SKU[c("ID",)]),]
but it shows just ID 1.
Some options ?
Thanks a lot.