duplicated() gives TRUE or FALSE statement depending if that position is duplicated previously in the vector. What if I wanted to remove not only the duplicated position, but also all the previous position that it is a duplicate of.
a <- c("A", "B", "C")
b <- c("A", "B", "C", "D")
a contains all the values that will be duplicated and b contains the values of a and some other values that are not duplicated.
How do I only extract "D"?
Here is another one: