[R] read.table

li1127217ye li1127217ye at 163.com
Mon Nov 19 08:07:40 CET 2012


> 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.



--
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.



More information about the R-help mailing list