[BioC] reading data from Beadarray into R

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Sep 30 00:19:36 CEST 2010


On Wed, Sep 29, 2010 at 6:15 PM, Hajar Hassani Lahsinoui
<hajar.hassani at gmail.com> wrote:
> Hi Jenny and Steve,
>
> Thank you for your help clearing things up!
>
> At least it recognizes the file now. Do you know what R means by line 2?:
>
> targets <- read.table("5513091009_A_beadTypeFile.txt")
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
>  line 2 did not have 3 elements

It's referencing the actual lines in the file "..._beadTypeFile.txt".

read.table expects the file it is reading has the same number of
columns per line, for each line.

it seems as if your first line has 3 columns, while your second line does not.

"columns" are determined by the value of the `sep` parameter in
read.table, which seems to default to any whitespace.

you can eyeball your file to see if this is the case, and what's
causing the hiccup.

See, ?read.table for more info.

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list