df1 <- data.frame(number = c(1,2,3,4,5),value=c(100,200,300,400,500))
df2 <- data.frame(number=c(1,2,3,7,10),value=c(100,200,300,444,555))
I have two dataframes with number as the identifier and values associated. I want to return a df3 which contains "number" that match in each data frame.
Expected Output df3:
number value
1 100
2 200
3 300
edit: I think I can use this true/false to subset
df1$number %in% df2$number