Re: [R] More effective calculation for loop

2011-05-13 Thread Joshua Ulrich
On Fri, May 13, 2011 at 4:32 AM, Wolfgang Wu wrote: > I am getting confused in how to use R effectively. Below is the example that I > would like to optimize, which is basically a loop. In its current version it > takes  about 20 seconds to run. I have looked at the apply function and but > didn't

Re: [R] More effective calculation for loop

2011-05-13 Thread John Kane
What is xts? What package? --- On Fri, 5/13/11, Wolfgang Wu wrote: > From: Wolfgang Wu > Subject: [R] More effective calculation for loop > To: R-help@r-project.org > Received: Friday, May 13, 2011, 5:32 AM > I am getting confused in how to use R > effectively. Below is

[R] More effective calculation for loop

2011-05-13 Thread Wolfgang Wu
I am getting confused in how to use R effectively. Below is the example that I would like to optimize, which is basically a loop. In its current version it takes about 20 seconds to run. I have looked at the apply function and but didn't seem to get it to work. I am sure this is relatively easy