I have 2 data frames: dfA
and dfB
I would like to be able to extract whole rows from dfB
that meet criteria based on dfA
Example:
if (dfA$colA == dfB$colB) && (dfB$colC >= dfA$colD) &&
(dfB$colC <= dfA$colE) { print rows from dfB }
The values from the 1st column in dfA
need to be an exact match for the 2nd column in dfB
AND
the values from column 3 in dfB
need to fall within a range set by columns 4 and 5 in dfA
.
The output should be the rows from dfB
that meet these criteria.