[R] run-time of an R function

Alexandre Santos Aguiar asaguiar at spsconsultoria.com
Mon Jan 16 19:30:44 CET 2006


Em Seg 16 Jan 2006 16:02, Rossi, Peter E. escreveu:
> of the function in the same R session, exec time = 7.1 min. Removing all
> objects via rm(list=(all=TRUE)) and initiating gc (gc(reset=TRUE))
> helps, but
> only slightly (exec time = 5.0 min).

Hi,

I am currently using extensively a script with +250 lines that performed the 
opposite:

3min 26s as first run
2min 57s in the second run and with several objects in memory

My script performs calculations of bayesian probabilities over 11 variables of 
1033 observations, uses no special library, performs several disk writes to a 
networked nfs exported directory and does the clean up of all explicitly 
created objects.

BTW, I currently use R 2.2.1 and it seems much faster than version 1.9 that I 
used before.

-- 

          Alexandre Santos Aguiar, MD
- independent consultant for health research -
       R Botucatu, 591 cj 81 - 04037-005
            São Paulo - SP - Brazil
             tel +55-11-9320-2046
             fax +55-11-5549-8760
            www.spsconsultoria.com




More information about the R-help mailing list