I have a dataset that looks like this:
Col1 Col2
0.7 AA
0.6 BBB
0.2 RR
0.8 TTT
0.0 SS
And another dataset that looks like that
List
BBB
RR
TTT
I want to remove rows from the first dataset when values from the second column does not match any of the names listed in the second dataset. Final product would look like this:
Col1 Col2
0.6 BBB
0.2 RR
0.8 TTT
I cannot find any easy way to run this in R. I tried different for and if loops but did not work. Anybody would know an easy solution?
Thank you!
Aucun commentaire:
Enregistrer un commentaire