From vograno at evafunds.com  Fri May  6 23:48:11 2005
From: vograno at evafunds.com (Vadim Ogranovich)
Date: Fri May  6 23:48:20 2005
Subject: [Rd] treating lists as data.frame-s
Message-ID: <C698D707214E6F4AB39AB7096C3DE5A59E9316@phost015.EVAFUNDS.intermedia.net>

Hi,
 
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. 

Suggestions?

Thanks,
Vadim


[Rd] treating lists as data.frame-s
Vadim Ogranovich