[R] expected behavior when parsing lines with special characters

Peter Langfelder peter.langfelder at gmail.com
Tue Feb 15 18:25:24 CET 2011


On Tue, Feb 15, 2011 at 9:21 AM, Robert M. Flight <rflight79 at gmail.com> wrote:
> Say I have a tab-delimited table I want to read into R. What should I
> expect to happen if some of the entries contain the character " ' "? I
> thought it would read the file fine, but that is not what happens.
> Instead, all the values in between two " ' "s get read into one field,
> and things are just seriously messed up. Is this a bug, and besides
> removing the offending characters, is there a fix?

Yes, use argument quote="\"" or even quote="" to disable quoting altogether.

See ?read.table

Peter



More information about the R-help mailing list