I have 3 text files c.dat
, n.dat
, and h.dat
The contents are similar, in this format
c.dat n.dat h.dat
1 0.ccc 3 1.nnn 1 2.hhh
2 0.ccc 4 1.nnn 2 2.hhh
4 0.ccc 5 1.nnn 5 2.hhh
Desired output:
1 0.ccc Inf 2.hhh
2 0.ccc Inf 2.hhh
3 Inf 1.nnn Inf
4 0.ccc 1.nnn Inf
5 Inf 1.nnn 2.hhh
6 Inf Inf Inf
7 ....
Each file has ~100 rows, but they don't always start from 1, and don't aren't always consecutive.
I need to align the 3 files by the first column, such that if the other files don't have it, it's filled in with something like NA, or NaN, or Inf... anything.
Thanks!