[R] R objects layout

Duncan Murdoch murdoch at stats.uwo.ca
Wed Mar 26 18:43:38 CET 2008


On 3/26/2008 12:20 PM, Faheem Mitha wrote:
> Hi,
> 
> Can anyone point me to documentation of how R objects such as vectors, 
> lists, matrices and data frames are laid out in memory? For example, which 
> of these are laid out as a 1-d array, 2-d array and so forth?

Vectors, lists and matrices are 1-d arrays.  Data frames are lists of 
vectors. This is in various places in the Intro and Language Reference 
manuals.  For example, from the latter:

"Matrices and arrays are simply vectors with the attribute dim and 
optionally dimnames attached to the vector."

Duncan Murdoch

> The R Internals document seems like the natural place to look, but I don't 
> see it there. If such things are only documented in source code, could you 
> point me to the relevant place(s)?
> 
> (Please CC me; I'm not subscribed.)
>                                                              Thanks, Faheem.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list