[R] read.table with numeric row names

kexinz zhangchicool at gmail.com
Thu Jul 12 23:58:45 CEST 2012


Thanks Yasir, this helps a lot. 
BTW, is there an R command to read just the first line of the file?


Yasir Kaheil wrote
> 
> just do this:
> colnames(r)<-substr(colnames(r),2,nchar(colnames(r)))
> 
> This will remove the X.
> Later when you want to use the headed to plot something, cast it as
> numeric:
> plot(colMeans(r)~as.numeric(colnames(r)))
> 


--
View this message in context: http://r.789695.n4.nabble.com/read-table-with-numeric-row-names-tp4636342p4636377.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list