Repo2docker: How to set R package version for packages not on CRAN?

Created on 13 Sep 2018  路  4Comments  路  Source: jupyterhub/repo2docker

How to set the R package version for packages available on

  • GitHub / GitLab /...
  • R-Forge
  • Bioconductor

The question came up on Twitter

enhancement

Most helpful comment

All 4 comments

Is the preferred way to install packages from these sources devtools? Is there a way to specify a commit hash in the devtools command?

In install.R you can (in principle) put arbitrary R code. It seems like you can specify the revision as part of the devtools call: https://rawgit.com/r-lib/devtools/master/docs/reference/install_github.html

Yeah I think devtools is probably the easiest.

@jimhester's reply on Twitter for installing from GitHub was:
If you are using the devtools functions to install from GitHub, supply the Git reference after the @. e.g devtools::install_github("tidyverse/dplyr@655c92fb") Will work with any branch or tag name as well. You can even use PR with "#123"

Do you want to make a PR to https://github.com/binder-examples/r that adds an example of using this and/or a PR to the repo2docker docs (not sure where would be best)?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuvipanda picture yuvipanda  路  5Comments

trallard picture trallard  路  4Comments

Morisset picture Morisset  路  5Comments

NHDaly picture NHDaly  路  6Comments

davidanthoff picture davidanthoff  路  3Comments