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

Thierry Onkelinx thierry.onkelinx at inbo.be
Wed May 31 16:17:39 CEST 2017


Dear Martin,

We use Docker to create an image with R and specific versions of the
required packages. You can find our docker image and the source code at
https://hub.docker.com/r/inbobmk/rstable/

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2017-05-31 11:18 GMT+02:00 Martin Watts <martinleewatts at gmail.com>:

> Hi,
>
> Thanks for your reply, I've taken a look at packrat and it looks
> interesting but I don't think it's quite what I want. Packrat works on the
> assumption that the R session is run from the project directory, which
> won't necessarily be true in our case since, for example, we interface with
> some of our R code from python and our packages reference each other.
>
> Our deployment process at the moment is to just install.packages our
> packages to get all the required dependencies. This work well so I'd like
> to keep to this structure but I'm surprised that the DESCRIPTION file
> supports the == syntax if there is no way to enforce it at install?
>
> My alternative would be to write my own script that parses our DESCRIPTION
> files, pulls out the required versions and uses some code like this (
> https://gist.github.com/viking/1503736) to install the external packages
> manually first before installing our packages, but this seems like it would
> be a lot of work.
>
> Thanks,
> Martin
>
> On Mon, May 22, 2017 at 8:52 AM, Facundo Muñoz <famuvie at gmail.com> wrote:
>
> > I think Packrat [1] might help:
> >
> > - Isolated: ... each project its own private package library.
> > - Reproducible: ... exact versions are the ones that get installed ...
> >
> > ƒacu.-
> >
> > [1] https://rstudio.github.io/packrat/
> >
> >
> > On 05/18/2017 04:34 PM, Martin Watts wrote:
> > > 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]]
> > >
> > > ______________________________________________
> > > R-package-devel at r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
> >
> >         [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-package-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list