To remove all rows from one dataframe that match any variables in any row or column in another dataframe in R, you can use the dplyr and tidyr packages. Here is a sample solution:
main.r447 chars22 lines
In this code:
dplyr and tidyr.df1 and df2, with columns id and name.anti_join function from dplyr to remove all rows from df1 that match any variables in any row or column in df2.by argument in anti_join specifies the columns to join on. In this case, we join on both id and name columns.df1_filtered, which contains only the rows from df1 that do not match any rows in df2.This will output:
main.r48 chars5 lines
gistlibby LogSnag