I am trying to read a fixed width text file using the read.fwf function. I am having difficulty though because a couple of my variables overlap. For example I may have the following line in my text file:
1A...
Variable one has a width of 1 and so it refers to "1" in the line. Variable 2 however has a width of 2 and refers to "1A". Looking at the read.fwf documentation it looks like you can specify widths, but this would make my second variable "A." instead of "1A". I was wondering if there is a way to use read.fwf. and specify start and end positions for the variables rather than just widths.
Note: this is similar to the question here but that discussion seemed to turn more towards a Stata package. I am not working with Stata in my example, I simply have start and end positions specified in a metadata file.