[R] R won't start keeps crashing

Duncan Murdoch murdoch.duncan at gmail.com
Fri May 13 16:28:17 CEST 2011


On 11-05-13 6:03 AM, Ivan Calandra wrote:
> I'm no expert, but checking the R-help list, I got the impression that
> saving a workspace often leads to problems.
> The interesting question (for me) would be to know why and how the
> corrupted file got corrupted, and then, what to do to avoid the problem
> if one really wants to save the workspace.
>
> For you Bazman76, I would advise you to never save the workspace. Save
> all command lines in a script (*.R) and important objects to files
> (either with save() and then load(), or one of the write functions, or
> saveObject()/loadObject from package R.utils, and so on).
> Someone please correct me if it is a bad practice.

That is good advice.

One way to end up with a "corrupted" workspace is to save it with a 
dependency on a particular package, then try to load it when that 
package is unavailable.  I'm going to see if R can handle that case more 
gracefully.

If people can describe other reproducible methods of getting a corrupted 
.Rdata it would be useful, at least for a list of "Don't do that" advice.

Duncan Murdoch

>
> HTH,
> Ivan
>
> Le 5/12/2011 18:27, Bazman76 a écrit :
>> I will read the intor to R.
>>
>> When closing I got a pop up asking me if I wanted to save the workspace I
>> just clicked yes?
>>
>> here is what I got
>>
>> load("C:/Documents and Settings/Hugh/My Documents/vars/vars/data")
>> Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
>> In addition: Warning message:
>> In readChar(con, 5L, useBytes = TRUE) :
>>     cannot open compressed file 'C:/Documents and Settings/Hugh/My
>> Documents/vars/vars/data', probable reason 'Permission denied'
>>
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/R-won-t-start-keeps-crashing-tp3516829p3518035.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at 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.
>>
>



More information about the R-help mailing list