Re: [R] improving/speeding up a very large, slow simulation

2013-02-13 Thread Benjamin Caldwell
That makes sense David; thanks again everyone for your help. *Ben Caldwell* Graduate Fellow University of California, Berkeley 130 Mulford Hall #3114 Berkeley, CA 94720 Office 223 Mulford Hall (510)859-3358 On Wed, Feb 13, 2013 at 4:25 PM, David Winsemius wrote: > > On Feb 13, 2013, at 3:33 PM

Re: [R] improving/speeding up a very large, slow simulation

2013-02-13 Thread David Winsemius
On Feb 13, 2013, at 3:33 PM, Benjamin Caldwell wrote: > Joshua, > > Thanks for the example, and the explanation. Nice article that you wrote - > the figures alone deserve a deeper dive, I think. > > As side note, I found out about profiling on another post and did it - it > appears that my igno

Re: [R] improving/speeding up a very large, slow simulation

2013-02-13 Thread Benjamin Caldwell
Joshua, Thanks for the example, and the explanation. Nice article that you wrote - the figures alone deserve a deeper dive, I think. As side note, I found out about profiling on another post and did it - it appears that my ignorance about how slow dataframes can be was the main problem. After tur

Re: [R] improving/speeding up a very large, slow simulation

2013-02-12 Thread Benjamin Caldwell
Anindya, Completely understand why you wouldn't want to look into the code. I don't understand your suggestion well enough to implement it, I lost you at "unlist your function variable . . ."; I don't understand why one would want to do that. Are there examples you'd suggest? If not I'll take a lo

Re: [R] improving/speeding up a very large, slow simulation

2013-02-11 Thread Joshua Wiley
Hi Ben, I appreciate that the example is reproducible, and I understand why you shared the entire project. At the same time, that is an awful lot of code for volunteers to go through and try to optimize. I would try to think of the structure of your task, see what the individual pieces are---fig

Re: [R] improving/speeding up a very large, slow simulation

2013-02-11 Thread Anindya Sankar Dey
Hi, I've just read your intro, not the full code. But one way first divide your input data into parts and make a list where each element of the list is one part of your input data. Rest of code put in a function, which will work on a part of your data. Build the function such that it takes list as

[R] improving/speeding up a very large, slow simulation

2013-02-11 Thread Benjamin Caldwell
Dear R help; I'll preface this by saying that the example I've provided below is pretty long, turgid, and otherwise a deep dive into a series of functions I wrote for a simulation study. It is, however, reproducible and self-contained. I'm trying to do my first simulation study that's quite big,