Jason Bryer

Managing a Local R Repository

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”)

Categorised as: R


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>