ankane / jetpack

A friendly package manager for R
Other
241 stars 16 forks source link

edit packrat lockfile metadata #13

Closed edavidaja closed 5 years ago

edavidaja commented 5 years ago

Really enjoying this simplified interface to packrat, thanks for putting it together.

Would it be possible to add the option of modifying the packrat lockfile from jetpack? I'd like to be able to choose my cran repo. Calling packrat::set_lockfile_metadata() from a jetpack project only modifies the file in the virtual env, and calling jetpack::check() resets it to the repo set in the packrat lockfile in the repo.

ankane commented 5 years ago

Hey @edavidaja, thanks for bringing this up. You should be able to update packrat.lock manually in your project for now. Ideally, you could:

  1. Specify a source in the DESCRIPTION file to change it globally, like Repos: CRAN=https://cloud.r-project.org/
  2. Specify a source for a specific package in the Remotes: field (remotes would need to support this)

I'd prefer not to expose the packrat settings directly. Since there's not a standard way to add it to the DESCRIPTION right now and manually updating it should work, I'm inclined to just wait on this for now.

ankane commented 5 years ago

Moved to #1