Re: [R] Problem with R-2.1.0: install.packages() doesn't work

From: Marc Schwartz <MSchwartz_at_MedAnalytics.com>
Date: Sat 23 Apr 2005 - 14:14:44 EST

Hi all,

In follow up to my message earlier, I spent some time applying the modification to the menu() function that I referenced earlier. I also recompiled a local copy of R on my FC3 system using:

./configure --without-tcltk

This results in:

> capabilities()

    jpeg      png    tcltk      X11 http/ftp  sockets   libxml     fifo
    TRUE     TRUE    FALSE     TRUE     TRUE     TRUE     TRUE     TRUE
  cledit  IEEE754    iconv
    TRUE     TRUE     TRUE


The first time around, I ran the menu() function unchanged and got the same error that Scott and Manuel reported earlier:

Error in inherits(x, "factor") : Object "res" not found

'res' is the value returned from the tcltk function tk.select.list() used in menu().

This appeared for the series of functions that call menu(), such as update.packages(), install.packages(), chooseCRANmirror(), contrib.url (), etc.

After modifying the menu function, I was able to get:

> install.packages("rgenoud")
--- Please select a CRAN mirror for use in this session --- CRAN mirror

  1. Australia 2: Austria
  2. Brasil (PR) 4: Brasil (MG)
  3. Brasil (SP 1) 6: Brasil (SP 2)
  4. Canada (BC) 8: Canada (ON)
  5. Denmark 10: France (Toulouse)
  6. France (Lyon) 12: France (Paris)
  7. Germany (Berlin) 14: Germany (Koeln)
  8. Germany (Mainz) 16: Germany (Muenchen)
  9. Hungary 18: Italy (Arezzo)
  10. Italy (Ferrara) 20: Japan (Aizu)
  11. Japan (Tsukuba) 22: Poland
  12. Portugal 24: Slovenia (Besnica)
  13. Slovenia (Ljubljana) 26: South Africa
  14. Spain 28: Switzerland (Zuerich)
  15. Switzerland (Bern 1) 30: Switzerland (Bern 2)
  16. Turkey 32: Taiwan
  17. UK (Bristol) 34: UK (London)
  18. USA (CA 1) 36: USA (CA 2)
  19. USA (MA) 38: USA (MI)
  20. USA (NC) 40: USA (PA 1)
  21. USA (PA 2) 42: USA (WA)
Selection:

So, with the modification in menu() and without tcltk available, the text menu now comes up properly.

The proposed patch for .../src/library/utils/menu.R is attached.

HTH, Marc Schwartz



R-help@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
Received on Sat Apr 23 17:00:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:23 EST