Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Rainer M Krug
Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in a table format with all the data

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Duncan Murdoch
On 12/14/2006 7:56 AM, Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in a table

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear R-help, I forgot to mention that I need the array in that format because I am going to do the same thing for another dataset of precipitation (ncep.data2) so they are both arrays of dimensions [144,72,46] so that I can correlate them globally and plot a visual image of the global

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread David Barron
What about gpcc.array - array(gpcc.data2[,5], dim=c(144,72,46)) On 14/12/06, Rainer M Krug [EMAIL PROTECTED] wrote: Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Marc Schwartz
On Thu, 2006-12-14 at 12:56 +, Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours to run at the rate it's going - this is ridiculous and I really need your help to find a more efficient way of loading up my array gpcc.array: #My data is stored in

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Rainer M Krug
David Barron wrote: What about gpcc.array - array(gpcc.data2[,5], dim=c(144,72,46)) I guess this will be slightly faster then my suggestion :-) ? On 14/12/06, Rainer M Krug [EMAIL PROTECTED] wrote: Jenny Barnes wrote: Dear R-help, I have a loop, which is set to take about 26 hours

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear R-help, Thank you for the responses off everyone- you'll be please to hear Duncan that using: gpcc.array - array(gpcc.data2[,5], c(144, 72, 46)) was spot-on, worked like a dream. The data is in the correct places as I checked with the text file. It took literally 2 seconds - quite an

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Barry Rowlingson
Jenny Barnes wrote: Dear R-help, Thank you for the responses off everyone- you'll be please to hear Duncan that using: gpcc.array - array(gpcc.data2[,5], c(144, 72, 46)) was spot-on, worked like a dream. The data is in the correct places as I checked with the text file. It took

Re: [R] loop is going to take 26 hours - needs to be quicker!

2006-12-14 Thread Jenny Barnes
Dear Patrick, Thank you for the link - I'd advise anyone who's started using R to have a look at these as well - any help is always appreciated. I've downloaded the S Poetry and will hit the books tomorrow and get reading it! Jenny S Poetry may be of use to you -- especially the chapter on