[R] Preventing repeated package installation, or pre installing packages

Larry Martell larry.martell at gmail.com
Wed Nov 29 15:28:23 CET 2017


I have a R script that I call from python using rpy2. It uses dplyr, doBy,
and ggplot2. The script has install.packages commands for these 3 packages.
Even thought the packages are already installed it still downloads,
builds, and installs them, which is very time consuming. Is there a way to
have it only do the install if the package is not already installed?

Also, I run in a docker container, so after the container is instantiated
the packages are not there the first time the script runs. Is there a way
to pre load the packages, in which case I would not need the
install.packages commands for these packages and my above question would
become moot.

	[[alternative HTML version deleted]]



More information about the R-help mailing list