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 of
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 momentI believe in using all the
tools available, if i
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 "'
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 remo
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 wrote:
> I am using read.table to import a text file within R.
>
I am using read.table to import a text file within R.
There are several "errors" in my text file. An "extra" quotation mark has
inadvertently been included within a few text fields.
e.g. for a pipe (|) delimited text file, I have something similar to this:
1|7|30| "dog"
2|6|25| ""cat"
3|4
6 matches
Mail list logo