对于以下data.frame
两个
Set1 <- data.frame(Object=c("one","two","three","four"),
Age=c(1,1,1,1),
Value=c(1,2,4,8))
Set2 <- data.frame(Object=c("one","two","three","five"),
Age=c(2,2,2,2),
Value=c(4,8,2,7))
Set1
我想在and中获取重复的条目(根据“对象”列)Set2
,即
Object Age Value
1 one 1 1
2 two 1 2
3 three 1 4
4 one 2 4
5 two 2 8
6 three 2 2
我该怎么做呢?