Entering edit mode
10.5 years ago
MAPK
★
2.1k
Hi Guys,
Is there a way to reorder the column of two tables, table1 and table2, according to the column names in the list (in the same order) and merge them into one table result.table.
list<-c("MAPK", "BCL2", "ALB", "MAPKK", "MEKK", "JUNK", "STR", "BRCA1")
table1
MAPK MAPKK MEKK JUNK STR
5 5 6 7 9
3 4 5 7 8
table2
BCL2 ALB BRCA1
4 4 3
4 4 3
result.table
MAPK BCL2 ALB MAPKK MEKK JUNK STR BRCA1
5 4 4 5 6 7 9 3
3 4 4 4 5 7 8 3
Thank you!
Sorry
hold[list]generates error.Missing a comma.
Sorry, typed too quickly. This is it.