Details

    • Type: Improvement
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.3.0
    • Fix Version/s: 6.6.0
    • Component/s: CRAN
    • Labels:
      None

      Description

      If I interactively execute setRepositories(addURLs = c(cran = "https://artifactory-url.com/artifactory/cran/")), I do not get any error but instead get the following displayed:

       

      > setRepositories(addURLs = c(cran = "https://artifactory-url.com/artifactory/cran/"))

      Repositories

       

      1: + CRAN

      2:   BioC software

      3:   BioC annotation

      4:   BioC experiment

      5:   CRAN (extras)

      6:   Omegahat

      7:   R-Forge

      8:   rforge.net

       

      Enter one or more numbers separated by spaces, or an empty line to cancel

      1:

       

      What’s odd to me is that “cran” (lowercase) does not appear in that list of choices. Additionally, when I exit my “R” session there is nothing updated on my system, in ~/R, or otherwise. It would appear that I would have to execute that command above every time. If I am correct, that’s not very useful Set Me Up guidance.

       

      At any rate, after some further exploration, I see A) an error on my part B) room for drastic improvement here

       

      I mistakenly assumed that the Set Me Up instructions were following the standard pattern of telling me something I could put into a runtime environment’s configuration file for permanent use (.Rprofile in this case) but the instructions are not and I feel I have confirmed this[1]. The instructions are telling me a command to run that, in theory, is going to set up my environment to forever use the new URL I tell it. However, the execution of setRepositories() doesn’t work for me in any permanent way as I’ve mentioned above. There is no updating of “Rprofile.site” visible anywhere.

       

      In line with the usual pattern of “Set Me Up” instructions, here’s what worked for me in my .Rprofile (sanitized to remove our hostname in case it gets pasted/reused). If you ask me it is a more appropriate instruction for end users to configure their environment. It is loaded every time R is run. It is only tested on Linux and so would need further exploration on other platforms, but it should work fine. Perhaps engage the “R” community for their thoughts on the best way for end-users to alter R repository definitions? I believe they will tell you the following, but I’m just a sysadmin/ops person...

       

      local(

      {   # Override/Configure the canonical "CRAN" repository to be OURS   r = getOptions("repos")   r["CRAN"] = "https://our-artifactory.example.org/artifactory/cran"   options(repos = r)   rm(r) }

      )

       

      I just noticed that the setRepositories() documentation even explicitly says:

       Note

      This does not set the list of repositories at startup: to do so set options(repos =) in a start up file (see help topic Startup).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nadavy Nadav Yogev
                Reporter:
                scottm Scott Mosher
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: