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

consider building function for p_install_load_gh #70

Closed
data-steve opened this issue Feb 22, 2016 · 3 comments
Closed

consider building function for p_install_load_gh #70

data-steve opened this issue Feb 22, 2016 · 3 comments

Comments

@data-steve
Copy link

As an active user of p_load_gh and p_install_gh, I find that there are cases in which certain packages that are in very active development need to be reinstalled. When someone on my team has paths to those github repos in their scripts as part of project set up, if they did an install on a newer version of that repo than I have, then when I try to run their code, it may fail because I'm working off the older version.

I know there is packrat and other types of tools for management package dependencies, but having a function in your package but make it possible to allow for regular updates when available and load the packages. As of now, I have to run a line of pacman::p_install_gh("........repos.....") then another line pacman::p_load_gh(".......repos....")

This should be one function, possibly just making p_install_gh auto-load would solve the problem.

@trinker
Copy link
Owner

trinker commented Feb 28, 2016

This would require a ping to github which could be doable. Automatically installing the most recent version may have unintended consequences and/or be unnecessary. An alternative solution would be to supply the version within the script as with the p_install_version function... though a gh version would be needed for github as well. This would only install the package if a particular version level was not reached.

@trinker
Copy link
Owner

trinker commented Mar 9, 2016

To Do: Make a p_load_gh_ver

@trinker
Copy link
Owner

trinker commented Mar 10, 2016

We didn't get it as succinct as proposed but should avoid problems on the team with sub versions in that a package's version is confirmed before loading. This means the package will only be installed if your library has a version below a threshold. p_load will still be needed.

You'd use it something like:

p_install_version_gh(
     c("trinker/termco", "hadley/rvest"), 
     c("0.2.0", "0.3.1.9000")
)

p_load(rvest, termco, dplyr)

trinker added a commit that referenced this issue Mar 30, 2016
  `p_install_version` for GitHub packages.  Thanks to Steve Simpson for this:
  #70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants