Loading R packages without internet
1
0
Entering edit mode
@tpsilverdoe-6975
Last seen 9.5 years ago
India

The cluster I use for analysis is not connected to internet, so I have to manually download packages to load them - but since R packages has dependencies I downloaded the entire source control to use it as source for loading packages. R CMD INSTALL is what I used to load the packages, R recognises the packages but doesn't recognise the other depending packages that are in the same folder. What should I do ?

installation • 3.6k views
ADD COMMENT
0
Entering edit mode
@laurent-gatto-5645
Last seen 13 hours ago
Belgium

It is not entirely clear what the problem is: "R CMD INSTALL is what I used to load the packages, R recognises the packages but doesn't recognise the other depending packages that are in the same folder.": INSTALL != load. Anyway, I can think of two options.

Option 1 I think the tricky part here is to get a list of required packages (including dependencies) with possible version numbers. I would proceed as follows.

1) Install a fresh R release on a computer that is online, and use biocLite to install all required packages. This will download all packages and dependencies into a temporary direcory - /tmp/Rtmp...../downloaded_packages. Do not close your R session. Find that directory and copy all the packages to your server. Also, just in case, I would get a list of packages and versions with

  ip <- installed.packages()
  save(ip, file = "ip.rda")

2) Install the same version of R on your offline server, and install the packages manually. This might be a bit fiddly, and you might need to record the order of installation from the first machine.

Option 2 A possibly more elegant solution would be to set up a local CRAN/Bioc mirror on your local network, and use it to directly install the software on your server(s). That might actually also save you time for subsequent updates and to install additional packages, or of you need to install packages on multiple nodes.

Hope this helps.

Laurent

ADD COMMENT

Login before adding your answer.

Traffic: 577 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6