Val Krem
2018-04-04 22:58:06 UTC
Hi all,
I have two files. The first file has two columns and the second file has about 15,000 columns and here is two samplesFile1
ABC1 zc124
ABC2 zc125
ABC3 zc126
ABC4 zc127
File2 ( has about 15, 000 columns) ABC1 1 0 1 2 1....1
ABC2 1 1 2 2 2....2
ABC3 2 2 1 0 1...,0
I want to merge the two files by the common column (column 1 in both files) and get the following output
Result
Zc124 1 0 1 2 1....1
Zc125 1 1 2 2 2....2
Zc126 2 2 1 0 1...,0
Is it possible to read file 2 as a two variables? i.e., the first columns as one variable and the remaining columns as another available? If this is possible then I can combine the two files using the common variable between the two files.
Thank you
I have two files. The first file has two columns and the second file has about 15,000 columns and here is two samplesFile1
ABC1 zc124
ABC2 zc125
ABC3 zc126
ABC4 zc127
File2 ( has about 15, 000 columns) ABC1 1 0 1 2 1....1
ABC2 1 1 2 2 2....2
ABC3 2 2 1 0 1...,0
I want to merge the two files by the common column (column 1 in both files) and get the following output
Result
Zc124 1 0 1 2 1....1
Zc125 1 1 2 2 2....2
Zc126 2 2 1 0 1...,0
Is it possible to read file 2 as a two variables? i.e., the first columns as one variable and the remaining columns as another available? If this is possible then I can combine the two files using the common variable between the two files.
Thank you