Thursday, August 29, 2019

How do I read txt file and separate columns using fixed width?

Q: How do I read a txt file and separate columns using fixed width?

A: You can use function read_fwf from library readr. Documentation available on https://www.rdocumentation.org/packages/readr/versions/1.3.1/topics/read_fwf