DF1:
a b
1 1 6
2 2 7
3 3 8
4 4 9
5 5 10
DF2:
c
1 3
2 8
3 4
4 2
5 9
I would like to see if each row of DF2 (column c) is between a & b in DF1; Hence the resulting filtering will be:
c
1 3
3 4
5 9
How should this be done? I have a very long DF2 and a short DF1 I am trying this but get the following error:
library(tidyverse)
> c %>%
filter(c>a & c<b)
Error in filter_impl(.data, quo) : Result must have length 5, not 10 In addition: Warning message: In c < b : longer object length is not a multiple of shorter object length