compare - Capturing matching and non-matching values between two dataframes in R -


I have read a lot on this, but I still can not find any answer that still works.

I am using the setdiff function in R to see the number of matches between the two dataframes. I know that I have more than 200 200 comments and the remaining non-match

  check = setdiff (dataset 1 $ variable1, dataset2 $ variable1)  

So far I've done this to get the number of matching and non-match values ​​

How do I return a list of matching and non-matching values?

thanks,

ed

all set deserves Match values ​​come with the intersect function. All values ​​in both variables meet with the union function, so values ​​which are in the union, but are not in the hole.

  var1 & lt; - Characters [1: 5] var2 & lt; - Characters [4: 8] Milan & Lt; - intersect (var1, var2) all & lt; - Association (var1, var2) non.matched & lt; - all [! % Match in all%]    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -