When I start R in the console of my machine (R version 4.3.1 on Ubuntu 22.04.3 LTS) and run update.packages(), a popup prompts me to select a CRAN mirror.

Conversely, when I ssh in our server (R version 4.3.1 on AlmaLinux 9.2), I get the console prompt which I like much better.
> update.packages(ask=FALSE)
--- Please select a CRAN mirror for use in this session ---
Secure CRAN mirrors
1: 0-Cloud [https]
2: Australia (Canberra) [https]
3: Australia (Melbourne 1) [https]
...
75: United Arab Emirates [https]
76: Uruguay [https]
77: (other mirrors)
Selection:
How can I set R on my machine to display the console prompt? Note that I do not want to set a default server.
This is controlled by the menu.graphics option.
menu.graphics:
Logical: should graphical menus be used if available?. Defaults to TRUE. Currently applies to select.list, chooseCRANmirror, setRepositories and to select from multiple (text) help files in help.
options(menu.graphics = FALSE)
update.packages()
--- Please select a CRAN mirror for use in this session ---
Secure CRAN mirrors
1: 0-Cloud [https]
2: Australia (Canberra) [https]
3: Australia (Melbourne 1) [https]
...
75: United Arab Emirates [https]
76: Uruguay [https]
77: (other mirrors)
To permanently default to text menus for the above functions, edit it into your .Rprofile file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With