I asked a similar(ish) question here but feel as though this may be different enough (and not exclusive to R) that it may warrant its own question.
In short, I need a .txt file with the following format:
Column 1 Column 2
There are two specifications:
Column 1 and column 2 must be aligned. This means that the starting character of each value in Columns 1 and 2 must be aligned vertically.
Only one character should separate columns 1 and 2. This is regardless of the length of the value in column 1 (the length of which varies).
Using a text comparing website, I found that the difference between a 'successful' file (left) and an 'unsuccessful' file (right, which separates the two columns with a variable number of 'space' characters) is some sort of single character that separates the two columns. The perceived width of said character varies based on the length of the value in column 1.
Is there any way in which I can iterate through a .txt file that separates the two columns with a variable number of 'space' characters (basically the file on the right) and replace it with the 'space maker' on the left?