[R] read.table with numeric row names

Yasir Kaheil kaheil at gmail.com
Thu Jul 12 21:48:06 CEST 2012


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

-----
Yasir Kaheil

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



More information about the R-help mailing list