Given I have flowing data set.
a = 1:3
b = 1:3
df1 = expand.grid(a,b)
c = 1:5
d = 1:5
df2 = expand.grid(c,d)
df3 = rbind(df1,df2)
df4 = unique(df3)
The premise is that df1 has a set of parameters. df2 has the same parameters, but with an expanded set. In the example df4 uses unique to remove any duplicated rows but it keeps only 1 of each of the duplicated rows, such that df4 is effectively the same as df2.
I need to completely remove the duplicated rows, not keep any unlike unique.
Basically I need a df5 that would only contain rows from df2 that are not part of df1, or completely remove all duplicated rows from my df3.
df5
Var1 Var2
1 4 1
2 5 1
3 4 2
4 5 2
5 4 3
6 5 3
7 1 4
8 2 4
9 3 4
10 4 4
11 5 4
12 1 5
13 2 5
14 3 5
15 4 5
16 5 5