想取出两列数据对应不同的那行观测 ,一步实现不来如bamsex_proportion[bamsex_proportion$sex1male_2female !=bamsex_new$sex1male_2female]
只能先把比较结果赋值给新列,再取出来对应的观测,
bamsex_proportion$compare<-if_else(bamsex_proportion$sex1male_2female ==bamsex_new$sex1male_2female,TRUE,FALSE)
bamsex_proportion %>%filter(compare==FALSE)
注:可以通过any 来看是否存在需要的值