i have two data frames df1 and df2, i want to filter out the data from df2 on the basis of values in df1.
df1 <- data.frame(name = c("col1","col17","col19","col22","col3","col4","col6","col8","col9","col11","col13"))
df2 <- data.frame(name = c("col1","col2","col3","col4","col5","col6","col7","col8","col9","col10","col11","col12","col13","col14","col15","col16","col17","col18","col19","col20","col21","col22"),
duration = c(70,45,50,50,60,10,70,80,90,100,100,90,80,10,30,20,20,40,40,50,50,100))
the output should be look like
name | duration |
---|---|
col1 | 70 |
col3 | 50 |
col4 | 50 |
col6 | 10 |
col8 | 80 |
col9 | 90 |
col11 | 100 |
col13 | 80 |
col17 | 20 |
col19 | 40 |
col22 | 100 |