[R] Closing R fails

Duncan Murdoch murdoch at stats.uwo.ca
Thu Nov 9 14:31:56 CET 2006


On 11/9/2006 7:18 AM, john seers (IFR) wrote:
>  
> Hello All
>  
> I cannot close R easily:
>  
>> 
>> q()
> Error in .Last() : could not find function "finalizeSession"
>> 
>  
> This seems to have started after I used the R.utils package. If I load
> the R.utils package I can close R successfully. But I do not want to
> have to do this every time I run R.

You seem to have a .Last function defined that contains a call to 
finalizeSession.  Remove it and the error should go away:

.Last # to print it and see if anything important is there
rm(.Last) # to remove it if not

Normally you don't need .Last, but you can define it if you want R to do 
something on shutdown.  It looks like R.utils did that for you at some 
point, and you saved the workspace afterwards.

Duncan Murdoch

>  
> Is there any way I can switch off /reverse this behaviour? (I have had a
> look in the archives/documentation but cannot find a solution).
>  
>  
> Thanks for any help.
>  
>  
> John Seers
>  
>  
>  
>  
>> R.version$os 
> [1] "mingw32"
>> R.version.string
> [1] "R version 2.4.0 Patched (2006-10-29 r39744)"
>> 
> 
>  
>  
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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