Re: [R] using read.table, removing extra quotation mark from a text field? (e.g. cat )

2010-09-12 Thread jim holtman
You can use the 'gsub' command to remove the quote marks. You could readLines/writeLines the file to clean it up with gsub before using read.table on it so it can all be done within R. On Sun, Sep 12, 2010 at 1:58 PM, Eva Nordstrom eva.nordst...@yahoo.com wrote: I am using read.table to import

Re: [R] using read.table, removing extra quotation mark from a text field? (e.g. cat )

2010-09-12 Thread Wil M Contreras Arbaje
While you are looking for a solution within R, it might be simpler to open your text file in almost any free text editor (Notepad++, Textwrangler, Smultron, vim come to mind), and do Replace all ' for . On Sep 12, 2010, at 3:58 PM, jim holtman wrote: You can use the 'gsub' command to

Re: [R] using read.table, removing extra quotation mark from a text field? (e.g. cat )

2010-09-12 Thread Dennis Murphy
Hi: On Sun, Sep 12, 2010 at 1:05 PM, Wil M Contreras Arbaje wil.contre...@gmail.com wrote: While you are looking for a solution within R, it might be simpler to open your text file in almost any free text editor (Notepad++, Textwrangler, Smultron, vim come to mind), and do Replace all ' for

Re: [R] using read.table, removing extra quotation mark from a text field? (e.g. cat )

2010-09-12 Thread Wil M Contreras Arbaje
True, I'd actually misread the problem as being ' and not . In the interest of expediency, here's one solution I can think off the top of my head: using MS-Word (dunno if it's taboo in these lists, but it's what I have at hand at the moment–I believe in using all the tools available, if it

Re: [R] using read.table, removing extra quotation mark from a text field? (e.g. cat )

2010-09-12 Thread Dennis Murphy
Hi: Thanks to Jakson Aquino, who showed me how to do a proper text substitution, we have a way out. It also turns out that in the last line, the last numeric field was missing, so I inserted an NA| in the last line of the data file before calling readLines(). His (correct) code is at the bottom