Really hope somebody is able to help please.
We have a need to run R in an environment which has no access to the internet.
So, working in an online environment, I used the R commands:
pkg.list = available.packages()
download.packages(pkgs = pkg.list, destdir = "C:\\MyRPackages")
to download current packages. These were downloaded as tar.gz
files. I transferred these to the environment where internet isn't available.
I then tried this command (following advice in Offline install of R package and dependencies):
library(tools)
write_PACKAGES()
to 'index' the packages. This doesn't seem to work, as it didn't create PACKAGES and PACKAGES.gz which it was meant to.
Funnily enough, this worked when I tried with a couple of packages which were .zip files, so figured there is some reason that R cannot recognize the tar.gz files. But in any case, when I tried:
install.packages("ggplot2", contriburl="file:///path/to/packages/")
I had an error message saying that the current version of R didn't support these packages.
So I seem to have a two-fold problem:
- issue about using the Write_PACKAGES command
- issue about version history
Would be grateful for any advice on this please.