On Wed, 1 Aug 2012, William Dunlap wrote:
An unmatched quote can make read.table run very slowly when there are lots
of lines in the file. E.g.,
Bill,
Yes. Turns out that there was no closing quote on a changed header. I
found this by an error message on one data file; the other data file
On Wed, 1 Aug 2012, Rich Shepard wrote:
What might cause this?
Must be computers acting like computers. Restored files from backup, made
changes one at a time, and there are no problems reading them into R data
frames. My apologies for taking up space here.
Rich
__
te final line found by readTableHeader ...".
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Rich Shepard
> Sent: Wednesday, August 01, 2012 10:52 AM
>
On Wed, 1 Aug 2012, Rich Shepard wrote:
What might cause this?
I restored these two files from last Friday and they are read into R with
no problems. So, I'll make one change at a time and see where things break.
Will post results when I have them.
Rich
___
Yesterday I changed the headers for a couple of columns in data text files
and removed hyphens from within character strings, too. When I tried to
re-read these data sources using read.table() I encountered an issue I've
not before seen. Both files were read almost instantly until yesterday's
wo
The # is the default comment character in read.table(), but that can
easily be changed:
> tc <- textConnection(
+ "yes yes yes yes yes
+ yes yes yes yes yes
+ yes yes # yes yes"
+ )
> x <- read.table(tc, comment.char="")
> x
V1 V2 V3 V4 V5
1 yes yes yes yes yes
2 yes yes yes yes yes
3 yes y
use the 'comment.char' parameter of read.table
Sent from my iPad
On Mar 1, 2012, at 17:51, Rui Barradas wrote:
> Hello,
>
>>
>> The problem is that I get a the following error bacause anything after the
>> # is ignored.
>>
>> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.
Hello,
>
> The problem is that I get a the following error bacause anything after the
> # is ignored.
>
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
> line 6 did not have 500 elements
>
> R thinks that line 6 has only 2 elements because of the #.
>
Use '
The problem is that you have an unbalanced quote (') in your input .
you need to specifiy quote = '' in read.table:
> tempTxt <- "103272;Canara Robeco Fortune '94;30.07;30.07;30.75;02-Apr-2007
+ "
> read.table(textConnection(tempTxt), sep=';', quote = '')
V1V2V3
Dear R-Group,
I am getting this error message "incomplete final line found by
readTableHeader" in the code below.
It seems to me that the error message is because of quote in the text data.
Is there any easy way to handle this? Or should I do a substitute.
> tempTxt <- "100589;Canara Robeco Exp
10 matches
Mail list logo