[ESS] R Problem: install.packages() in NTEmacs 21.3 with ESS 2.3.5.

Neil Shephard nshephard at gmail.com
Mon Nov 13 08:49:14 CET 2006


On 11/13/06, Wei Tang <william.wtang at yahoo.com> wrote:

> I got a R problem when issuing the command 'install.packages()' within NT Emacs 21.3 + ESS 2.3.5. The Emacs freezes after this command.
>
> I've already searched this mailing list for a solution. I found the same problem was reported in 2005 archives. The problem could be solved by issuing 'library(tcltk)' or 'windows()' first. But I don't think this is a nice solution. I found another trick, which is to cancel the install.packages() at the first time by "C-c C-c" and re-enter this command again, then the CRAN mirror site selection windows will be pop-up. However, this solution is also not satisfiable.

You haven't said how your calling install.packages(), but by the
sounds of it your not specifying the mirror to use (mention of
library(tcltk) and the pop-up window appearing).

One option would be to load either of the recommended libraries in
your .Rprofile (or windows equivalent, sorry not familiar with
windows).  Alternatively...

> I think this is a bug from ESS instead of R since there is no such problem when I use Rgui or Rterm alone. It is a big surprise to me that the latest ESS still contains such a problem.  I wonder if there is anyone who has already solved this problem. Thanks.

Its not a bug in ESS at all.

The simple solution would be to specify the mirror that you want to use.

First select a mirror that is geographically close to you from
http://cran.r-project.org/mirrors.html

To specify the mirror explicitly when  calling the install.packages()
command by for example...

install.packages("gap", repos="http://cran.uk.r-project.org/",
dependencies=T, clean=T)

The 'smart' option (as you can see from ?install.packages) is to set
repos in your .Rprofile (or  windows equivalent).

Something along the lines of....

options(repos=c(CRAN=http://cran.uk.r-project.org/",
CRANextra="http://www.stats.ox.ac.uk/pub/RWin"))

As mentioned you should set the URL's to reflect your geographically
local repository.

The above example for setting your repos was gleaned from...

Author: Ripley, Brian D.
Title: Packages and their management in R 2.1.0
Journal: R News
Date: 2005
Volume: 5
Number: 1
Pages: 8--11

is available under the Newsletter section of the R site
(http://www.r-project.org/).

HTH's

Neil
-- 
"An intellectual is a person who has discovered something more
interesting than sex." - Aldous Huxley

Email - nshephard at gmail.com / neilshep at cyllene.uwa.edu.au
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/




More information about the ESS-help mailing list