Skip to content
Prev 314085 / 398502 Next

Does R have an equivalent for Matlab's cell array?

On Dec 22, 2012, at 2:58 AM, Matthijs Daelman wrote:

            
That's a surprising conclusion. Vectors are typical components of dataframes.
A dataframe _is_ a two-dimensional list.

You should probably explain what you are trying to do, since there is very possibly a better way of structuring this problem without recasting the data into a "wide format". Most of the data processing in R is handled very well without such a strategy.

If you wanted to proceed despite my misgivings, then there are several functions such as `split`, `tapply` and `by` that could allow you to segregate such data. It's best to use dput to present the data since console output is often ambiguous as to the underlying data structures.