I've merged some data, and it works great. But I'd like to know what data that's left out, i.e. data that didn't "find" matching data and was thus discarded. Is there a way to do something like this:
not_merged<-!merge(df1,df2)
The code above is pseudo code. The code below isn't.
df1 = data.frame(CustomerId = c(1:6), Product = c(rep("Toaster", 3), rep("Radio", 3)))
df2 = data.frame(CustomerId = c(2, 4, 6), State = c(rep("Alabama", 2), rep("Ohio", 1)))
merged<-merge(df1,df2)