Dear all,

would appreciate a piece of help with a simple question: I am reading in R
a file that is formatted as a matrix (an example is shown below, although
it is more complex, a matrix of 1000 * 1000 ):

the names of the columns are 0, 10000, 40000, 80000, etc
the names of the rows are 0, 10000, 40000, 80000, etc

           0 200000 400000
0          0       0       0
200000  0       0       0
400000  0       0       0

shall I use the command :

y <- read.table("file",row.names=1, header=T)

the results is :

> y[1:3,1:3]
       X0 X200000 X400000
0       0       0       0
200000  0       0       0
400000  0       0       0

The question is : why R adds an X to the names of the columns eg X0,
X20000, X40000, when it shall be only 0, 20000, 40000 ? thanks !

-- bogdan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to