MRAN reliability and use of local MRAN repositories with file:// urls RRS feed

  • Question

  • Hi there,

    We were hit by an apparent outage to on Friday 3rd June so we are looking to move to storing the relevant CRAN snapshots on our network instead and using this as our MRAN mirror.

    However, the checkpoint() function can't process file:// urls since it uses readLines to test connectivity to the MRAN url which doesn't work against a folder url.

    The following code shows the issue, it gives this warning and fails:

    cannot open file 'C:/Local/R/MRAN/': Permission denied

    options(warn = 2) #treat warnings as errors since we don't expect any

    #Sets up the checkpoint package which ensures that we
    #get packages from a tested snapshot date i.e. different
    #users of the script all use exactly the same package versions
    SetupCheckpoint <- function() {
      message("Setting up checkpoint")
      options(checkpoint.mranUrl = "file:///C:/Local/R/MRAN/")

        #Get packages as of the following, tested snapshot date
      librarySnapshot <- "2016-03-09"
      R.version <- "3.2.3"
      checkpointLocation <- file.path(Sys.getenv("USERPROFILE"), "R")
      if(!dir.exists(file.path(checkpointLocation, ".checkpoint"))) {
        dir.create(file.path(checkpointLocation, ".checkpoint"), recursive = TRUE)

                 R.version = R.version,
                 checkpointLocation = checkpointLocation)


    Please advise if this is something that you could look into. Also please put onto azure or somewhere where it will be more reliable as there have been a couple of outages of it.

    Monday, June 6, 2016 4:21 PM

All replies

  • I have now added an issue and associated pull request for this:

    Wednesday, June 8, 2016 7:27 AM