> A
[,1] [,2] [,3] [,4]
[1,] 1 7 13 19
[2,] 2 8 14 20
[3,] 3 9 15 21
[4,] 4 10 16 22
[5,] 5 11 17 23
[6,] 6 12 18 24
> write.csv(A, file="file.csv",row.names=FALSE,col.names=FALSE)
Warning message:
In write.csv(A, file = "file.csv", row.names = FALSE, col.names = FALSE) :
attempt to set 'col.names' ignored
> read.csv("file.csv",header=FALSE,sep=",")
V1 V2 V3 V4
1 V1 V2 V3 V4
2 1 7 13 19
3 2 8 14 20
4 3 9 15 21
5 4 10 16 22
6 5 11 17 23
7 6 12 18 24
请问我把矩阵储存成文件形式又调用出来时,如何去除红色部分的V1 V2 V3 V4这一行,因为这一行的存在我不能直接用as.matrix()把data.frame转化成matrix