CRAN updates

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CRAN updates

Rich Shepard
   Is there a file where I can specify the repository to use when upgrading
packages rather than having R ask each time?

TIA,

Rich

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: CRAN updates

Dirk Eddelbuettel

On 5 January 2019 at 05:46, Rich Shepard wrote:
|    Is there a file where I can specify the repository to use when upgrading
| packages rather than having R ask each time?

Many ways. You want to set options(repos) -- see eg help(download.packages)
and see help(Startup) for the many ways where you can do that.

The Debian packages do it for you as the question is i) silly and ii) we now
a globally valid and "best" (as in: fast, local network mirror) solution. You
can add these six lines to Rprofile.site (as Debian does) or your ~/.Rprofile
or ...

  ## We set the cloud mirror, which is 'network-close' to everybody, as default
  local({
      r <- getOption("repos")
      r["CRAN"] <- "https://cloud.r-project.org"
      options(repos = r)
  })

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: CRAN updates

Rich Shepard
On Sat, 5 Jan 2019, Dirk Eddelbuettel wrote:

> ... can add these six lines to Rprofile.site (as Debian does) or your ~/.Rprofile

Dirk,

   Thank you. I missed seeing .Rprofile when I went looking for it.

Regards,

Rich

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.