Store Matrix in DataFrame Cell
1
1
Entering edit mode
Dario Strbenac ★ 1.6k
@dario-strbenac-5916
Last seen 11 minutes ago
Australia

How can one store a matrix in a particular column?

> DataFrame(name = "test", value = I(matrix(1:4, ncol = 2)))
DataFrame with 2 rows and 2 columns
         name    value
  <character> <matrix>
1        test      1:3
2        test      2:4

I had hoped that the result would be a DataFrame of one row, with a matrix of two rows and two columns in the first row and second column of the DataFrame.

S4Vectors • 89 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 3 hours ago
United States

Put it in a list and put the list in a column.

Login before adding your answer.

Traffic: 1223 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6