Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set R package version for packages not on CRAN? #397

Open
HeidiSeibold opened this issue Sep 13, 2018 · 4 comments
Open

How to set R package version for packages not on CRAN? #397

HeidiSeibold opened this issue Sep 13, 2018 · 4 comments

Comments

@HeidiSeibold
Copy link

HeidiSeibold commented Sep 13, 2018

How to set the R package version for packages available on

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

The question came up on Twitter

@betatim
Copy link
Member

betatim commented Sep 13, 2018

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

@HeidiSeibold
Copy link
Author

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"

@betatim
Copy link
Member

betatim commented Sep 13, 2018

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)?

@HeidiSeibold
Copy link
Author

HeidiSeibold commented Sep 15, 2018

Sure. Working on it: https://mybinder.org/v2/gh/HeidiSeibold/r-1/master?urlpath=rstudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants