[R] function optimization: reducing the computing time

2007-07-24 Thread Matthieu Dubois
Dear useRs, I have written a function that implements a Bayesian method to compare a patient's score on two tasks with that of a small control group, as described in Crawford, J. and Garthwaite, P. (2007). Comparison of a single case to a control or normative sample in neuropsychology:

Re: [R] function optimization: reducing the computing time

2007-07-24 Thread Prof Brian Ripley
You need to make use of the profiling methods described in 'Writing R Exensions'. My machine is about 4x faster than yours: I get Each sample represents 0.02 seconds. Total run time: 62.08041 seconds. Total seconds: time spent in function and callees. Self seconds: time spent in