[R] Pb with \t interpretation in R

Duncan Murdoch murdoch.duncan at gmail.com
Mon Aug 29 22:43:38 CEST 2011


On 29/08/2011 3:29 PM, Imbeaud (Inserm U674) wrote:
> Hi,
>
> I have to deal with a huge .txt table (~485.577 rows and 469 columns,>  1.5
> Go file)
> I used the read.table function
> >  tmp=read.table("data.txt", header=TRUE, sep="\t", fill=TRUE,
> na.strings="NA", comment.char="", stringsAsFactors = FALSE)
> However, I encounter troubles in interpreting some "\t" separator.. A column
> displays \t\t\t\t characters fusioning consecutive columns and rows?
> see:
> "Body;3UTR\t\t\t\t\t\t\t\t\t\n3\tcg00000109\t59755374\t59755374\t0.8353283\t2657\t7\t7\t122.8385\t241.5193\t354\t2303\t0.00\t0.005"
>
> Is there any way to deal with such problem?


I would guess there is a problem with quotes in the file, so R thinks 
that line is a quoted string.

Set quote="" to disable recognition of quotes.  See ?read.table.

Duncan Murdoch



More information about the R-help mailing list