I have one table(1) that looks like this (it is an all by all distance matrix transformed into a tab separated list):
sample1 sample2 405 sample3 sample4 400 sample5 sample6 1 sample7 sample8 20 sample1 sample3 40 I have another table(2) which contains those samples which meet a certain criteria:
sample1 sample2 sample8 How can I parse the first table(1) to extract only those rows in which both the variables in columns 1 and 2 can be found in table(2)?
ie desired comparisons are only:
sample1 sample2 405 sample2 sample8 40 sample8 sample1 100
dplyrcan be used to joindata.framedput()to show your data!