Skip to content
Prev 166056 / 398502 Next

Changing Matrix Header

Hi Gundala,

try chopping off the top row like
newx<-as.matrix(x[2:dim(x)[1],])

OR

try changing it to a data frame...
new x<-data.frame(x,row.names=NULL)

#pretty sure its not row.names but there is probably an equivalent for 
col.names

OR

look into ?read.table and specify header = F

Cheers, Si.





----- Original Message ----- 
From: "Gundala Viswanath" <gundalav at gmail.com>
To: <r-help at stat.math.ethz.ch>
Sent: Tuesday, January 06, 2009 8:14 AM
Subject: [R] Changing Matrix Header