How to download R packages using FTP

I need to support an R environment on a Windows 7 PC that does not have internet access.

I would like to download (on DVD, ultimately) the current version of all ~ 5,000 packages to provide R users on this PC.

Is there an FTP script or other good way to download all zip files for R packages?

I know there are daily R updates, but one good day will be enough to get me started.

+3
source share
2 answers

Presumably, you have an installation where you have Internet access. I would just install this installation to download everything. Here is an example at http://www.r-bloggers.com/r-package-automated-download/ . Run R and try the following:

pkg.list = available.packages()
download.packages(pkgs = pkg.list, destdir = "C:\\MyRPackages")

, , DVD DVD ( , , - , ).

. - , R . . R- .

- R:

update.packages(repos="path-to-my-DVD",repos = NULL, type = "source")
+4

rsync , , repos install.packages. . (, rsync /bin/windows/contrib/3.0/), Windows ( , repos/bin/windows/contrib/3.0/), , .

rsync -rtlzv --delete \
    cran.r-project.org::CRAN/bin/windows/contrib/3.0/ \
    repos/bin/windows/contrib/3.0/
+2

Source: https://habr.com/ru/post/1530804/


All Articles