[R] re ad.table

threshold r.kozarski at gmail.com
Fri Dec 19 13:35:31 CET 2008


Hi , I want to use the read.table to the following example 'data.txt' format:
a       b      c      d      e      f
SPX	LSZ	100	C	0	34.4
SPX	LSZ	100	P	0	1.3
SPX	LSZ	105	C	0	30.3
SPX	LSZ	105	P	0	1.85
SPX	LSZ	110	C	0	26.4

and I want to have the columns a,b,d read as the 'character' data, a the
remaining columns as 'numeric'. What I did was:
read.table("data.txt",header=T,
colClasses=c("character","character","numeric","character",
"numeric","numeric"), but I could not get what I want, since all values were
in the 'character' format. I will apprecaite any suggestions.
best, robert
-- 
View this message in context: http://www.nabble.com/read.table-tp21090550p21090550.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list