I am having trouble to read a file containing lines like the one below in R.
"_:b5507F4C7x59005","Fabiana D\"atri"
Any idea? How can I make read.table understand that \” is the escape of quote?
Cheers,
Alexandre
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems to me that
read.table/read.csvcannot handle escaped quotes.…But I think I have an (ugly) work-around inspired by @nullglob;
(This won’t handle embedded
,as @Ben Bolker noted)The test file looks like this (I added a non-string column for good measure):
And here is the code:
The output is then correct: