I have a situation like this:
data.frame1 (240 columns and variable number of rows):
COL1 COL2 COL3 a e h b f i c g l d
and data.frame2
Gene VAL a 3 b 7 c 0.5 d 3.7 e 9.08 f 1.3 ... ...
I would like to match and subset each COL of the first data.frame with the data.frame2 (so with the first column of the second data.frame) recursively in order to have the following output:
out:
data.frame3
COL1 VAL COL2 VAL a 3 e 9.08 b 7 f 1.3 ... ... .... ....
any suggestion?
Thanks
This can be done with the function
lapply: