0

At work, I am attempting to use R, but need to install packages. Simple enough, but there is a problem:

The IT policy is that employees cannot access the internet on machines where they have permission to install software, and visa verse. I am working with the IT department to come up with an agreeable solution, but for now I must find another way to do things.

In short, I need to download packages onto one machine where I have internet privileges and then transfer the files to a machine where I have software installation privileges.

  • 3
    So, use a USB drive... what's the question? And you don't need permissions to install software in order to install packages. You can put your package library in any location you're able to write files. – Joshua Ulrich Aug 12 '13 at 20:50
  • Could you install the packages in a local library? You do not need install permissions for that. I also agree with @JoshuaUlrich – dayne Aug 12 '13 at 20:50
  • This isn't an `R` question - unless the question is what file to put the packages in manually (in which case it's just `Program Files/R/R-VersionNumber/library` on windows) – Señor O Aug 12 '13 at 21:04

1 Answers1

1

You can download the package manually from cran, move it to your computer, then install it.

When you type install.packages() at the prompt without any parameters, it'll give you a popup where you can select the desired package.

Instead, you can go directly to one of the mirror sites. For example:

http://cran.cnr.berkeley.edu/

You just have to save the package(zip, tgz, or tgz.gz depending on your OS) to a folder, open up R from that folder, then call

install.packages("yourPackage.zip")

from the R command prompt.

The problem is that if that package has any dependencies, you'll have to make sure you install them too. You might wind up installing 10 packages, just to be able to use the one you want. It's hard without an internet connection.

kith
  • 5,486
  • 1
  • 21
  • 21
  • Or, if you're using the default Windows RGUI, there's a menu item "Install from local zip file" which does the same thing for you. – Carl Witthoft Aug 12 '13 at 21:27