Noobie Noobie - 2 months ago 13
R Question

R: how to download the zip binaries and all the dependencies of a list of packages for an offline installation on another machine?

I am using

R 3.3.1
and the latest version of
R studio
on a computer behind a firewall.

I would like to know how I can download all the
zip binaries
(not the sources, because I cannot compile them) for the packages I need (
dplyr
,
plm
, etc) AND their dependencies on my home computer, so that I can export them to the machine under firewall and just install them offline.

How can I do that?
Thanks!

Answer

Use the Packrat R package; it has a bundle method which packs up all the packages (and their dependencies), and an unbundle method which unpacks them onto the target machine. They go into a private library, too, so they won't stomp on other libraries on your machine.

More here: https://rstudio.github.io/packrat/

Once you've installed Packrat, type ?packrat::bundle for further instructions.