I have a huge data.frame that looks like this:
Gene Sample1 Sample2 Sample3 .....
A 0.34 0.99 1
B 1.3 9.4 67
D 13 2 284
H 456 0.11 0.22
G 0 32 0.8
............
12.000 total rows and 150 columns.
And another vector:
Measurements
0.8
0.34
0.22
1
32
I simply would like to match the vector with each column of the data.frame and get a final data frame that looks like this:
Gene Sample1 Sample2 Sample3 .....
A 0.34 NA 1
B NA NA NA
D NA NA NA
H NA NA 0.22
G NA 32 0.8
NA are values that are not in the vector.