[R] Cannot quit R - fame package issue?
Jeffrey J. Hallman
jhallman at frb.gov
Wed Nov 19 19:42:14 CET 2008
I am the author of the 'fame' package, and I can confirm that earlier versions
did indeed use Greg Warnes addLast() function to add to the user's .Last()
function. The current version no longer does so.
Dan Slayback <dan.slayback at nasa.gov> writes:
> Thanks very much for the tips. Simply removing .Last did allow me to exit, and
> looking at sessionInfo showed that there was a "fame_2.3" namespace loaded,
> even without loading the fame package, which I guess had this remnant code for
> .Last from a previous version of fame (there appears to be no .Last in the
> current version of fame):
> R version 2.8.0 (2008-10-20)
> attached base packages:
>  stats graphics grDevices utils datasets methods base
> loaded via a namespace (and not attached):
>  fame_2.3
>  "base" "fame" "graphics" "grDevices" "methods" "stats" 
> So after unloading the namespace fame, and rm(.Last), and re-saving the
> workspace, I can now exit without problems - thanks!
> Prof Brian Ripley wrote:
>> See the help for .Last:
>> Immediately _before_ terminating, the function '.Last()' is
>> executed if it exists and 'runLast' is true. If in interactive use
>> there are errors in the '.Last' function, control will be returned
>> to the command prompt, so do test the function thoroughly.
>> You can avoid it via arguments to q() (see its help). However, if the 'fame'
>> package has been ill-mannered enough to put a .Last in your workspace, then
>> you can and should delete it and re-save the workspace.
>> I can't see the function "validServerIsRunning" in the current fame package,
>> so it may be a legacy of a workspace from an earlier version.
>> Packages really should not be using the user's workspace, and in particular
>> not setting .Last there. A couple of packages do have .Last in their space,
>> but it is not guaranteed that their version will be visible: reg.finalizer()
>> is the way to do this in a package.
>> On Mon, 17 Nov 2008, Dan Slayback wrote:
>>> Hello list member:
>>> I've recently had a problem in that I'm unable to quit an R Session. I
>>> noticed this after the update to 2.8.0, but I believe I also noticed it on
>>> another machine, in the previous version. It occurs on both linux and Mac
>>> platforms. It only occurs when I start R in some particular workspaces that
>>> have alot of objects in them; it does not occur if I start R in an empty
>>> workspace. I dont have to do anything in the workspace after starting R to
>>> get this to occur, and no packages are loaded by default. Here's a summary
>>> from a Linux environment:
>>> $ R
>>> R version 2.8.0 (2008-10-20)
>>> Copyright (C) 2008 The R Foundation for Statistical Computing
>>> ISBN 3-900051-07-0
>>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>>> You are welcome to redistribute it under certain conditions.
>>> Type 'license()' or 'licence()' for distribution details.
>>> Natural language support but running in an English locale
>>> R is a collaborative project with many contributors.
>>> Type 'contributors()' for more information and
>>> 'citation()' on how to cite R or R packages in publications.
>>> Type 'demo()' for some demos, 'help()' for on-line help, or
>>> 'help.start()' for an HTML browser interface to help.
>>> Type 'q()' to quit R.
>>> [Previously saved workspace restored]
>>>  ".GlobalEnv" "package:stats" "package:graphics"
>>>  "package:grDevices" "package:utils" "package:datasets"
>>>  "package:methods" "Autoloads" "package:base" > q()
>>> Save workspace image? [y/n/c]: n
>>> Error in .Last() : could not find function "validServerIsRunning"
>>> function ()
>>> if (exists("fameRunning") && fameRunning())
>>> if (validServerIsRunning())
>>> <environment: namespace:fame>
>>> As the .Last function is referring to the fame package, I figure it must be
>>> something to do with that. There are objects in the workspace that require
>>> fame to be loaded, but at this point, I have not loaded the fame package,
>>> or accessed those objects. If loaded, the same error occurs when trying to
>>> Thanks in advance for any suggestions on how to troubleshoot this.
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
> Dan Slayback, PhD
> Research Scientist
> Science Systems and Applications, Inc. tel: (301) 614-6687
> Biospheric Sciences Branch, Code 614.4 fax: (301) 614-6695
> NASA Goddard Space Flight Center dan.slayback at nasa.gov
> Greenbelt, MD 20771 or daniel_slayback at ssaihq.com
> R-help at r-project.org mailing list
> 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