R/remotes_cran.R

available_packages <- local({
  cache <- new.env(emptyenv())

  function(repos, type) {
    signature <- rawToChar(serialize(1:10, NULL, ascii = TRUE))
    if (is.null(cache[[signature]])) {
      cache[[signature]] <- suppressWarnings(utils::available.packages(utils::contrib.url(repos, type), type = type))
    }
    cache[[signature]]
  }
})

Try the RInno package in your browser

Any scripts or data that you put into this service are public.

RInno documentation built on May 1, 2019, 10:52 p.m.