I have a .csv file that I am trying to load into R. The problem is, it is putting an "X" in front of all of my column names (yes, they all start with numbers, but it doesn't put the X there when it reads the rows which are the same names -> it is a distance matrix). I am having an issue ordering my data so that one file with column names matches another file with the same row names (though in a different order) because if I read in a file that has the numeric names down the rows, it doesn't put the "X" in front of the name, but if I read in a file that has the numeric names across the columns, it puts an "X" before each name. Thus, I can't tell it to order/subset according to matching names because none of them match (because of that stupid X!!) I'm getting very frustrated because I can't do any more analysis on my data until I get this problem fixed. Please Help!!!
Here is a very small demonstration of my issue:
>data <- read.csv("filename.csv", row.names = 1)
>data
1 2 3
1 # # #
2 # # #
3 # # #
>names(data)
"X1" "X2" "X3"
>rownames(data)
"1" "2" "3"
How can I get this to stop?!?!?!
Here is a very small demonstration of my issue:
>data <- read.csv("filename.csv", row.names = 1)
>data
1 2 3
1 # # #
2 # # #
3 # # #
>names(data)
"X1" "X2" "X3"
>rownames(data)
"1" "2" "3"
How can I get this to stop?!?!?!