Кажется, что вы хотите узнать уникальную часть colnames(df1)
и colnames(df2)
,, может быть, вы можете попробовать gplots::venn
library(gplots)
t1 <- c("a", "b", "c")
t2 <- c("a", "b" ,"d") # assume t1 and t2 is your column name of df1 and df2
test <- venn(list(t1,t2))
test
вы получили: