I am parsing a text file in R line by line.
Typically, a line looks like this:
2 1 3GFT B 19 ? 187 ? P01116 1 169 1 169
So I parse it like so:
items<- unlist(strsplit(filedata[i]," +"))
However, for a very specific line, it looks like this:
1 3GFT HIS A 79 ? UNP P01116 GLN 61 'SEE REMARK 999' 61 19
Notice that in the line above, the ‘See Remark 999’ should be 1 field yet using my parse, it will be 3. Can someone help me with the strsplit so that it parses correctly?
Thank you!
Maybe you can use
scan:Which gives :