[R-pkg-devel] R force download of specific package versions in DESCRIPTION file

Martin Watts martinleewatts at gmail.com
Thu May 18 16:34:57 CEST 2017


I have created a package (which I host on a local server) that I have set
up to depend on exact versions of other packages, i.e my DESCRIPTION file
looks like this:

Package: myPackage
Depends:
    R (>= 3.2.5)
Imports:
    dplyr (== 0.5.0),
    lazyeval (== 0.2.0),
    lubridate (== 1.6.0),
    magrittr (== 1.5),
    reshape2 (== 1.4.2)


My expectation is that when I run install.packages('myPackage') that each
of these specific dependency versions will be installed, but this is not
the case. It looks like if a dependent package is not present at all then
it is installed to the correct version, but when it is present at a LATER
version it is not rolled-back to the desired version.

Is there a way that we can force all requested versions of these packages
to be installed? We would like this behaviour as we'd like a way to
guarantee that all R environments are exactly the same when running this
code.

Note that I've been testing using devtools::install, but I assume that this
mirrors the behaviour of install.packages.
Also posted on SO: http://stackoverflow.com/questions/44028355/r-force-
download-of-specific-package-versions-in-description-file

Thanks,
Martin

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list