Skip to content
GitHub

Configure CRAN

Send install.packages through Depsilo's /cran/ route with options(repos).

BEFOREhttps://cloud.r-project.org
AFTERhttp://localhost:23333/cran/

R selects a CRAN mirror with options(repos). Put it in .Rprofile so interactive sessions and scripts both pick it up.

~/.Rprofile
options(repos = c(CRAN = "http://localhost:23333/cran/"))

For a one-off check, set it inside a session instead:

options(repos = c(CRAN = "http://localhost:23333/cran/"))
install.packages("jsonlite")
  1. Check that the instance is ready

    终端窗口
    curl -fsS http://localhost:23333/ready
  2. Install a package

    install.packages("jsonlite")
  3. Confirm the traffic in Admin

    Check the /cran/ requests and cache results in Access logs.