Re: [R] read.table error

2009-06-21 Thread Forafo San
Thank-you all for your reply. It turns out that there were both # characters and unbalanced quotes in the character fields that were creating problems for read.table. Putting in the options quote="" and comment="" in the read.table statment fixes the problem. On Fri, Jun 19, 2009 at 9:51 PM, j

Re: [R] read.table error

2009-06-19 Thread jim holtman
Try comment.char='', quote='' You may have unbalanced quotes or comments (#) in your data. On Fri, Jun 19, 2009 at 5:50 PM, Forafo San wrote: > Hello, > > I'm receiving an error on attempting to use the read.table() function > to read in data from a tab-delimited file. The file has more than >

Re: [R] read.table error

2009-06-19 Thread Gabor Grothendieck
Use the count.fields function to find out how many fields it thinks each row has. On Fri, Jun 19, 2009 at 5:50 PM, Forafo San wrote: > Hello, > > I'm receiving an error on attempting to use the read.table() function > to read in data from a tab-delimited file. The file has more than > 60,000 rows

Re: [R] read.table error

2009-06-19 Thread Peter Ehlers
I'm guessing that there's something wrong with one of your column separators. Have you tried leaving out the 'sep="\t"' argument? -P Forafo San wrote: Hello, I'm receiving an error on attempting to use the read.table() function to read in data from a tab-delimited file. The file has more than

[R] read.table error

2009-06-19 Thread Forafo San
Hello, I'm receiving an error on attempting to use the read.table() function to read in data from a tab-delimited file. The file has more than 60,000 rows with 94 tab-delimited columns. However, the error occurs on row 3 of the file: > wl <-read.table("sr003lines.tab", header=T, sep="\t") Error i

Re: [R] read.table error

2008-09-04 Thread Steve Murray
Thanks Prof. Ripley! I knew it would be something simple - I'd missed the "\t" from the read.table command! I won't be doing that again...!! Thanks again, Steve __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] read.table error

2008-09-04 Thread Prof Brian Ripley
On Thu, 4 Sep 2008, Steve Murray wrote: Dear all, I have a tab-delimited text (.txt) file which I'm trying to read into R. This file is of column format - there are in fact 3 columns and 259201 rows (including the column headers). I've been using the following commands, but receive an error

[R] read.table error

2008-09-04 Thread Steve Murray
Dear all, I have a tab-delimited text (.txt) file which I'm trying to read into R. This file is of column format - there are in fact 3 columns and 259201 rows (including the column headers). I've been using the following commands, but receive an error each time which prevents the data from bei