save matrix values to data frame and divide the column

Hi, i have the this matrix that generated from dataframe. I want to save this in csv and make these values to be put to row and col variables accordingly.
row col
[1,] 24 2
[2,] 50 2
[3,] 57 2
[4,] 101 2
[5,] 125 2
[6,] 145 2
[7,] 58 3
[8,] 94 3

When i use write.table function and save it into csv, my data look like this.

row "col"
1 24 2
2 50 2
3 57 2
4 101 2
5 125 2
6 145 2
7 58 3
8 94 3

for exaple the first row, i want 1, 24 and 2 to be in different column. Any suggestion?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.