[R] column name of a table

herodote@oreka.com herodote at oreka.com
Fri Dec 16 16:31:19 CET 2005


hy all,

I wish to switch in a part in my code that use "read.table" to "scan", actually i use this:

tab<-scan("data.dat",what=integer(),skip=1)
dim(tab)<-c(75,length(tab)/75)
tab<-t(tab)

It gives me a new tab with 75 columns, but i when i was using read.table with headers then attach i could use the columns names to access the data values, now how can i attach the columns names that are on the first line of the file data.dat?

Any help would be great!

thks all
guillaume.




More information about the R-help mailing list