Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
2
0
Entering edit mode
Sally ▴ 250
@sally-2430
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20080121/ 89b6c642/attachment.pl
• 1.3k views
ADD COMMENT
0
Entering edit mode
@henrik-bengtsson-4333
Last seen 6 months ago
United States
On Jan 21, 2008 5:24 PM, Sally <sagoldes at="" shaw.ca=""> wrote: > I am using limma and am trying to set up an ExpressionSet. When I use the following script to read in a table of expression data (17,329 rows x 29 columns, tab delimited): > > exprdata<-read.table("exprsData.txt", header=TRUE) If it is a tab-delimited file, it is safer it you specify that explicitly, i.e. use argument sep="\t". The default recognizes any white space, e.g. if you have a "feature" with a space in the name it will not work. > > I get the following error message: > > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : > line 304 did not have 29 elements > > > > I looked at line 304 and it looks fine. All 29 columns have data. Typically the error messages are useful, so treat it as if there indeed is a problem on that line. There might be empty spaces/tabs etc at the end of that line. See ?read.table for options. See especially arguments 'strip.white', 'fill', and 'comment.char'. Also, try to read data from the first 303 rows using argument nrow=303. Do you get what you expect? > > I have also set options(expressions=400000) > > Have I reached some maximum # of expressions that can be read in, or is it another problem? If I have reached a maximum #, is there a fix? That option has nothing to do with gene expression data. It deals with syntactical R expression (think programming language). /Henrik > > > My exprsData.txt file looks like this (note this is not the whole spreadsheet) > > Feature c0M1 c0M2 c0M3 c0M4 > U179971 -4.7472 -4.43814 -4.3977 -2.97843 > e1 -0.24565 -0.53124 0.109064 -0.01936 > e2 -0.71906 0.035403 -0.16786 0.528748 > e3 -0.17362 0.32998 -0.0791 -0.50046 > e4 0.065989 0.003221 -0.30596 -0.42857 > e5 0.269098 -0.34523 -0.98694 -0.57842 > e6 0.038301 -0.09612 0.190023 -0.10283 > e7 -0.06462 -0.56698 -0.34373 0.285194 > e8 -1.10146 -0.06621 0.337491 -0.1891 > CA054869 -0.83861 0.145514 -0.40484 -0.18785 > CB490276 -0.71377 0.569419 -0.99984 -0.51384 > > > Thank you > > Sally Goldes > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
@dr-sanjay-bhatikar-2604
Last seen 10.2 years ago
Hi Sally, I think what this means is you have in your header a label in the 1st position. The simple way to solve this would be to delete the header label of the 1st column. Try it! Cheers! - Sanjay Sally wrote: > I am using limma and am trying to set up an ExpressionSet. When I use the following script to read in a table of expression data (17,329 rows x 29 columns, tab delimited): > > exprdata<-read.table("exprsData.txt", header=TRUE) > > I get the following error message: > > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : > line 304 did not have 29 elements > > > > I looked at line 304 and it looks fine. All 29 columns have data. > > I have also set options(expressions=400000) > > Have I reached some maximum # of expressions that can be read in, or is it another problem? If I have reached a maximum #, is there a fix? > > > My exprsData.txt file looks like this (note this is not the whole spreadsheet) > > Feature c0M1 c0M2 c0M3 c0M4 > U179971 -4.7472 -4.43814 -4.3977 -2.97843 > e1 -0.24565 -0.53124 0.109064 -0.01936 > e2 -0.71906 0.035403 -0.16786 0.528748 > e3 -0.17362 0.32998 -0.0791 -0.50046 > e4 0.065989 0.003221 -0.30596 -0.42857 > e5 0.269098 -0.34523 -0.98694 -0.57842 > e6 0.038301 -0.09612 0.190023 -0.10283 > e7 -0.06462 -0.56698 -0.34373 0.285194 > e8 -1.10146 -0.06621 0.337491 -0.1891 > CA054869 -0.83861 0.145514 -0.40484 -0.18785 > CB490276 -0.71377 0.569419 -0.99984 -0.51384 > > > Thank you > > Sally Goldes > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > ---------------------------------------------------------------------- DISCLAIMER:----------------------------------------------------------- ---------- "This e-mail is confidential and may also be privileged. If you are not the intended recipient, please notify us immediately; you should not copy or use it for any purpose, nor disclose its contents to any other person". Biobase Databases India Pvt. Ltd., Bangalore-560001. Tel: 91-80-41136224/225.
ADD COMMENT

Login before adding your answer.

Traffic: 810 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6