[R] read.table with special chars

Jim Lemon jim at bitwrit.com.au
Tue Jan 19 10:07:45 CET 2010


On 01/19/2010 07:41 PM, Marc Noguera wrote:
> Hi all,
> I am just starting with R and I have come across a problem which I guess
> it is easy to solve. I am reading a table with read.table function.
> This table contains chars which seem to be problematic when reading them
> such as "'" and "#", if I remove these characters fromt the table by
> hand the problem disappears. Otherwise, the whole table is not read,
> since reading stops at the problematic tuple.
> I have been looking in the ?read.table manual but have not found
> anything. Is there any option to make R not interpret these characters?
>
Hi Marc,
Try changing the "quote" argument to "\"" and the comment.char argument 
to "".

Jim



More information about the R-help mailing list