Note though that the posting guide asked you not to use the word 'crash', as your audience has no idea what you mean by it. In some of the senses people use (e.g. when R reports an error in your code), you should expect R to 'crash'.

On 28/12/2012 09:04, Jeff Newmiller wrote:
You are not wrong to expect R to not crash. However, R (as most people use it) 
is not monolithic, and you have provided neither reproducible code nor 
sessionInfo() with the relevant packages loaded to help anyone interested in 
investigating the problem. You are the most likely person to be able to 
generate sample code that reproduces your problem, even if imperfectly.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnew...@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

Steve Powers <power...@nd.edu> wrote:

Hello,

This one has been bugging me for a long time and I have never found a
solution. I am using R version 2.15.1 but it has come up in older
versions of R I have used over the past 2-3 years.

Q: Am I wrong to expect that R should handle hundreds of iterations of
the
base model or statistical functions, embedded within for loops, in one
script run? I have found that when I write scripts that do this,
sometimes
they have a tendency to crash, seemingly unpredictably.

For example, one problem script of mine employs glm and gls about a
hundred
different times, and output files are being written at the end of each
iteration. I have used my output files to determine that the crash
cause is
not consistent (R never fails at the same iteration). Note that the
data are
fixed here (no data generation or randomization steps, so that is not
the
issue). But it is clear that scripts with larger numbers of iterations
are
more likely to produce a crash.

And a year or two ago, I had a seemingly stable R script again with for
looped model fits, but discovered this script was prone to crashing
when I
ran it on a newer PC. Because the new PC also seemed to be blazing
through R
code absurdly fast, I tried adding a short "fluff" procedure at the end
of
each iteration that required a few seconds of processing time. Low and
behold, when I added that, the script stopped crashing (and each
iteration
of course took longer). I still don't understand why that fixed things.

What is going on? Solutions? Thanks.---steve

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to