Returns a data frame with rows and columns corresponding to the
original object's structure. If `x` is a matrix, each column in the matrix
becomes a column in the data frame. If `x` is a list where all elements
are of the same length, each element of the list becomes a column in the
data frame. Attributes such as rownames, colnames, and dimnames (if any)
are preserved in the conversion.