subset - Drop out observations by conditioning on other data in R -


i have 2 data sets below. want remove 1st data observations matched id, v1 , user 2nd data sets.
how should that?

   id     v1   user   v2   v3   v4   ...    1      1         10    1      2     b     15    1      3     c     13    2      1         11    2      1     b     13    3      1     c     15    3      2     b     20    4      1     d     11    4      2         15    4      3     b     11    4      3     c     12      id     v1   user    1      3     c      2      1     b      3      2     b      4      3     c   

this should work:

merged_df <- merge(data dataframe_1,data dataframe2, by=c("id","v1","user"), all.x=true)  

this should exclude observations matched.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -