I am wondering if there's a way to use install.packages()
or other related functions to do the following: only download the sources (i.e. tar.gz
files) of the specified packages and all their dependencies into a specified folder (on Windows).
One reason to do this is: say I have a Linux account that is not enabled for internet access. In order to install the packages on the Linux machine, I would first download all the needed sources on my Windows machine, then ftp them over to the Linux machine, and install them on the Linux machine using
install.packages('/home/me/R/Packages/blah.tar.gz', repos = NULL)
See Question&Answers more detail:os