Skip to content
Prev 303537 / 398503 Next

r data structures

On Aug 16, 2012, at 11:49 AM, Schumacher, Jay S wrote:

            
About half of what you have deduced is wrong. Matrices, arrays, and  
dataframes do have dimensions, at least in technical R parlance,  
namely they have an attribute which can be queried with dim(). By  
definition matrices and dataframes have 2 dimensions. Arrays and  
matrices can be redimensioned, but dataframes cannot.

Factors, lists, and atomic vectors do not have "dimensions", but they  
do have "lengths". An appropriately structured list (one with vectors  
all the same length) can be coerced to a dataframe with as.data.frame().