Managing a Local R Repository

[This article was first published on Jason Bryer » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I will be teaching a workshop on R and LaTeX at NEAIR in just under a month. One of the issues I will encounter is a lack of Internet access. I also work with restricted data from NCES which requires the computer to be secured including no network access. As such, I need to manage software from removable media. I have written some functions that will create a local repository, update a local repository, and install packages from the local repository. These are included as part of a new R package irutils that I am developing in support for the workshop and accompanying document/book, Introduction to R an LaTeX for Institutional Research. The irutils is being hosted on Github but the R script file can be retrieved directly here: https://github.com/jbryer/irutils/blob/master/R/LocalRepos.R. Here are the functions available (note that the createLocalRepos function can take a long time to run as it will download approximately 2GB of data for source alone):

  • createLocalRepos(local.repos = “~/MyLocalCran”, type=”source”)
  • updateLocalRepos(local.repos = “~/MyLocalCran”, type=”source”)
  • local.available.packages(local.repos = “~/MyLocalCran”, type=”source”)
  • local.install.packages(c(‘devtools’, ‘ggplot2′), local.repos = “~/MyLocalCran”, type=”source”)

To leave a comment for the author, please follow the link and comment on their blog: Jason Bryer » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)