[Rd] update.packages forces Tcl/Tk interface despite ask=TRUE if the DISPLAY environment variable is set (PR#8115)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Aug 31 22:47:05 CEST 2005

robert.king at newcastle.edu.au writes:

> Full_Name: Robert King
> Version: 2.1.1
> OS: Linux (debian stable, with backport R)
> Submission from: (NULL) (
> update.packages documentation (and code, from what I can make out) says:
>      ask: logical indicating whether to ask user before packages are
>           actually downloaded and installed, or the character string
>           '"graphics"', which brings up a widget to allow the user to
>           (de-)select from the list of packages which could be updated.
>            The latter only works on systems with a GUI version of
>           'select.list', and is otherwise equivalent to 'ask = TRUE'.
> But, if I try ask=TRUE, it tries loading the Tcl/Tk interface (which I found out
> because I'm doing this remotely and it crashed.
> > update.packages(ask=TRUE)
> --- Please select a CRAN mirror for use in this session ---
> Loading Tcl/Tk interface ... Error in fun(...) : Tcl already loaded
> Error: .onLoad failed in 'loadNamespace' for 'tcltk'
> On the other hand, if I log out and ssh back with X forwarding turned off, it
> does the right thing,

This is unrelated to ask=TRUE. It is during the choice of CRAN site
that R is trying to fire up a Tk listbox (it might be debated whether
this is a good idea, but it _is_ intentional). If you set the
repository yourself, this won't happen.

The error looks a bit odd though. The logic is supposed to be that
either you have Tcl/Tk capabilities and you get the popup, or you
don't and get a text menu.

So something appears not right with your Tcl/Tk configuration.

   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907

More information about the R-devel mailing list