I am attempting to import a .txt file into R with the line separator denoted as "\" and the column separator as "*". However, each line is wrapped, and I cannot find a function to set a customized line separator.
The real file is my company's banking 822 edi file (so about 10,000 lines), so I cannot show the actual text. However, BofA does not unwrap these files when you download them.
The .txt file I am attempting to import looks something like this:
| Example Text File |
|---|
| 1*AAA*2*BBB\2*CC |
| C*3*DDD |
I want it to look like this:
| Col1 | Col2 | Col3 | Col4 |
|---|---|---|---|
| 1 | AAA | 2 | BBB |
| 2 | CCC | 3 | DDD |
I have been unable to find a function to do this, so any help would be greatly appreciated. Thank you.