1

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

  • be carefull when you write in caps, if feels like you are screaming at us. :) – Liora Haydont Jul 17 '18 at 16:03
  • Could you please add some example data (doesn't have to be your 13,000 line actual data, you could create smaller dataframes with the same structure). It's easier to understand questions if we can see how your data and code look. See [how to write a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Jan Boyer Jul 17 '18 at 16:19
  • Sorry for the misunderstanding before. I hope this explains what I need better. Thank you for your time – Umber Sheikh Jul 20 '18 at 07:42

0 Answers0