I have two data frames with different columns and rows:
One of the tables are specifically expressed genes names in rows (750 entries) with statistical analysis (p-val, fold change) in columns. (750x2 matrix)
The second table is all expressed genes names(13,000) and their associated genes in the same row (rows go as long as 100). (13,000x100 matrix)
I am interested in creating a data frame with the 750 expressed gene names from the first file and using a match function in R that will insert the associated genes from table2.
Example:
First Data table
Name   Fold Change P-value
A   0   3
B   1   4
F   2   6
H   1   8
Second Data table
Name   X1  X2  X3  X4  X5
A   A1  A2  A3  A4  A5
B   B1  B2  B3  B4  B5
C   C1  C2  C3  C4  C5
D   D1  D2  D3  D4  D5
E   E1  E2  E3  E4  E5
F   F1  F2  F3  F4  F5
Desired Output
Name   X1  X2  X3  X4  X5
A   A1  A2  A3  A4  A5
B   B1  B2  B3  B4  B5
D   D1  D2  D3  D4  D5
F   F1  F2  F3  F4  F5
