[Rd] treating lists as data.frame-s

Vadim Ogranovich vograno at evafunds.com
Fri May 6 23:48:11 CEST 2005

For the sake of efficiency I am trying to do away from data frames and
use lists instead. The two more frequently used operations on data
frames are row subscripting "[" and "[<-" for which I want to find good
(idiomatic) replacements. 
For x[i,j] extraction I came up with the following replacement:
y = lapply(x[j], function(col) col[i])

which looks concise enough and is more efficient.

However I couldn't think of anything elegant for y[i,j] = x. 



More information about the R-devel mailing list