A matrix Aexample is:
Aexample
[,1] [,2] [,3] [,4]
[1,] 0.6 0.4 0.00 0.0
[2,] 0.4 0.4 0.00 0.0
[3,] 0.4 0.4 0.00 0.0
[4,] 0.0 0.0 0.40 0.4
[5,] 0.0 0.0 0.34 0.4
[6,] 0.0 0.0 0.40 0.4
It is saved to a file by
write.table (Aexample, file = "~/R/Aexample", row.names = FALSE, col.names = FALSE);
And then I read by
Aexample = as.matrix(read.table(file="~/R/Aexample"));
But the result always has V1 V2 V3 V4 column names that I don't want:
V1 V2 V3 V4
[1,] 0.6 0.4 0.00 0.0
[2,] 0.4 0.4 0.00 0.0
[3,] 0.4 0.4 0.00 0.0
[4,] 0.0 0.0 0.40 0.4
[5,] 0.0 0.0 0.34 0.4
[6,] 0.0 0.0 0.40 0.4
What's the simplest way to save the Aexample matrix and then read from file and get the original Aexample matrix? (Not to read to aa = as.matrix(read.table(file="~/R/Aexample")) and then create Aexample from aa with many lines of code)