foreach and allied packages have helped me speed up some code
significantly. I have four cores in my machine and this allows me to
get away with this...
HTH
Stephen
On Wed, Aug 17, 2011 at 9:59 PM, Jim Holtman wrote:
> anytime my code starts to take more than a couple of minutes to run what
>
anytime my code starts to take more than a couple of minutes to run what might
look like a simple set of commands, I use Rprof to see where the time goes.
Run this on your script and you might get some insight into the problem area.
If it ran for an hour, I would defintely take a deep dive int
On Aug 17, 2011, at 8:14 PM, mark_horo wrote:
Hi I'm trying to speed my loop up. Any Suggestions?? At the moment
it takes a
few days to run.
THE CODE
We are not surprised.
Rainfall_dataset <- read.table("1km_grid_nzmg.csv",
header=TRUE, sep=",", na.strings="NA", dec=".", strip.w
Hi I'm trying to speed my loop up. Any Suggestions?? At the moment it takes a
few days to run.
THE CODE
---
for(i in 1:11) {
for (j in 3:12) {
for (k in 1
General suggestions: avoid cbind() and avoid accessing data frames. Convert
data frames to matrices before accessing them. Also, why do you print? You
don't really want to print(t) for every iteration of the loop, do you? Also
avoid defining elements within the loop that need to be defined only onc
5 matches
Mail list logo