[R] Efficient selection and alteration of dataframe records

2005-02-03 Thread Daniel E. Bunker
Hi All, I am writing a simulation that examines the effects of species extinctions on ecological communties by sequentially removing individuals of a given species (sometimes using weighted probabilities) and replacing the lost individuals with species identities randomly sampled from the

Re: [R] Efficient selection and alteration of dataframe records

2005-02-03 Thread Gabor Grothendieck
I did not attempt to follow your code or discussion but you could try these: 1. try to pin down what part of your code is taking the time 2. try to eliminate the loop, if possible 3. use matrices rather than data frames -- matrices are faster Daniel E. Bunker deb37 at columbia.edu writes: :