Leave only those rows in matrices which have equal elements at certain column

前端 未结 4 1102
一向
一向 2021-01-28 00:56

Let me show an example. Consider we have 3 tables (focus on columns N):

   Table 1         Table 2        Table 3
-------------   -------------   -------------
           


        
4条回答
  •  梦谈多话
    2021-01-28 01:37

    Once you find the "common denominator" (here Table1), you could do like this:

    Table2 <- Table2[Table2$N %in% Table1$N,]
    Table3 <- Table3[Table3$N %in% Table1$N,]
    

提交回复
热议问题