Skip to content
Prev 299975 / 398502 Next

read.table with numeric row names

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.