[R] read.table

PIKAL Petr petr.pikal at precheza.cz
Mon Nov 19 11:11:45 CET 2012


Hi

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of li1127217ye
> Sent: Monday, November 19, 2012 8:08 AM
> To: r-help at r-project.org
> Subject: Re: [R] read.table
> 
> > read.table("data.txt",header=TRUE,
> colClasses=c("character","character","numeric","character",
> "numeric","numeric"))
>     a   b   c d e     f
> 1 SPX LSZ 100 C 0 34.40
> 2 SPX LSZ 100 P 0  1.30
> 3 SPX LSZ 105 C 0 30.30
> 4 SPX LSZ 105 P 0  1.85
> 5 SPX LSZ 110 C 0 26.40
> 
> It's right result! "header=TRUE",not "header=T". I don't know why not.

You probably has some T variable defined in your workspace. What is result if you write

T

in your console.
Regards
Petr

> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/read-table-
> tp871880p4650010.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list