Re: [R] Problem to remove loops in a routine

2007-08-01 Thread jim holtman
First thing to do is to use Rprof to determine where the time is being spent and then you can pinpoint what section of code is taking the time. A quick look says to do all your subsetting at once. You might look into using 'split' to create the subsets and then access the subsets with "[[...]]".

[R] Problem to remove loops in a routine

2007-08-01 Thread Sébastien
Dear R-users, I have written the following code to generate some trellis plots. It works perfectly fine except that it is quite slow when it is apply to my typical datasets (over several thousands of lines). I believe the problem comes from the loops I am using to subset my data.frame. I read