[R-SIG-Mac] Recovering from R hangs/crashes -

Barry M. Lesht blesht at gmail.com
Sun Mar 5 20:02:59 CET 2017


Hi - In an off-list e-mail exchange David Diez suggested that the little
bash function I put together might be useful for others.  This isn't a
'fix,' just a way to simplify getting R running again.  From David's
experience it sounds like the only real fix available now is to completely
erase your hard drive and re-install Sierra, R, etc.

My problems with R generally occur when I attempt to open an existing file
when working in R.  I use "standard" R with the R GUI from CRAN.  Instead
of seeing the list of available files, an empty window appears along with
the dreaded spinning beach ball.  At this point I have to go to the Finder
and force R to quit.

I added the following function to my .bashrc file:

function fixRhang()
{
 cd ~/Library/Saved\ Application\ State
rm -R org.R-project.R.savedState/
cd
rm .Rhistory
}

After I force R to quit, I open an XQuartz window, and just enter

bash-3.2$ fixRhang

At this point, I can open R again and continue working (though obviously
the command history is empty).

I'm sure that there are better (or more efficient) ways of accomplishing
this, but it works for me.

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list