Hi, Thanks for your reply. In terms of example data, hopefully the following should help people understand what I am trying to do.
Somehow, a LF (Linefeed) has appeared in record 2 in c_var. This has meant the record is "broken" and the second part of the record shifts down to the next line.

I am hoping that there is some code I could use in R that will delete the extra LF without removing the LF in the actual record delimiter.
The following is how the data should look. I have greyed out the CR/LF characters as they wouldn't actually be seen when reviewing the data.

Thanks for any ideas you have.
Andrew