[R] memory management uestion

Federico Calboli f.calboli at imperial.ac.uk
Mon Feb 19 22:02:48 CET 2007


Charles C. Berry wrote:

> Whoa! You are accessing one ROW at a time.
> 
> Either way this will tangle up your cache if you have many rows and 
> columns in your orignal data.
> 
> You might do better to do
> 
> Y <- t( X ) ### use '<-' !
> 
> for (i in whatever ){
>     do something using Y[ , i ]
> }

My question is NOT how to write the fastest code, it is whether dummy variables 
(for lack of better words) make the memory management better, i.e. faster, or not.

Best,

Fede

-- 
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place, London W2 1PG

Tel  +44 (0)20 7594 1602     Fax (+44) 020 7594 3193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com



More information about the R-help mailing list