Is this what you want:
> ds1 <- read.table(text = "1 A
+ 2 B
+ 3 X
+ 4 AA
+ 5 A
+ 6 D
+ 7 XA
+ 8 C", as.is = TRUE)
>
> ds2 <- read.table(text = "1 A
+ 2 X
+ 3 A", as.is = TRUE)
>
> # find matches
> ds3 <- ds1[!(ds1$V2 %in% ds2$V2), ]
> ds3
V1 V2
2 2 B
4 4 AA
6 6 D
7 7 XA
8 8 C
On Mon,
Dear all,
I want to delete the exact matches in a large dataset based on a smaller
dataset. In other words I want to subtract the smaller dataset from the larger
one. The smaller dataset is a part of the larger one. The datasets contains
hundred of thousands of lines (1 column) and the content
2 matches
Mail list logo