I'm trying to do a query in rmysql to get data from a db. I have a list of idNumbers in a column that I want to match and pull records for from a database.
R data frame: df1
idNumColumnInR saleAmt
345 22.34
456 44.53
678 77.87
... ...
I think it would be something like to go from db -> R:
select * from dataBase where idNum in (df1$idNumColumnInR).
I could just use a for loop and go thru each row of the column but was curious if there's a better way.