packrat

Packrat is a dependency management system for R

https://github.com/rstudio/packrat

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 41 committers (2.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords from Contributors

rmarkdown pandoc literate-programming latex epub bookdown book package-creation gitbook visualisation
Last synced: 10 months ago · JSON representation

Repository

Packrat is a dependency management system for R

Basic Info
Statistics
  • Stars: 406
  • Watchers: 26
  • Forks: 90
  • Open Issues: 234
  • Releases: 12
Created over 12 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog

README.md

R-CMD-check <!-- badges: end -->

NOTE

Packrat has been soft-deprecated and is now superseded by renv.

While we will continue maintaining Packrat, all new development will focus on renv. If you're interested in switching to renv, you can use renv::migrate() to migrate a project from Packrat to renv.


packrat

Packrat is a dependency management system for R.

Use packrat to make your R projects more:

  • Isolated: Installing a new or updated package for one project won't break your other projects, and vice versa. That's because packrat gives each project its own private package library.
  • Portable: Easily transport your projects from one computer to another, even across different platforms. Packrat makes it easy to install the packages your project depends on.
  • Reproducible: Packrat records the exact package versions you depend on, and ensures those exact versions are the ones that get installed wherever you go.

See the project page for more information, or join the discussion in the Posit Community forums.

Read the release notes to learn what's new in Packrat.

Quick-start Guide

Start by installing Packrat:

install.packages("packrat")

Then, start a new R session at the base directory of your project and type:

packrat::init()

This will install Packrat, set up a private library to be used for this project, and then place you in packrat mode. While in packrat mode, calls to functions like install.packages and remove.packages will modify the private project library, rather than the user library.

When you want to manage the state of your private library, you can use the Packrat functions:

  • packrat::snapshot(): Save the current state of your library.
  • packrat::restore(): Restore the library state saved in the most recent snapshot.
  • packrat::clean(): Remove unused packages from your library.

Share a Packrat project with bundle and unbundle: - packrat::bundle(): Bundle a packrat project, for easy sharing. - packrat::unbundle(): Unbundle a packrat project, generating a project directory with libraries restored from the most recent snapshot.

Navigate projects and set/get options with: - packrat::on(), packrat::off(): Toggle packrat mode on and off, for navigating between projects within a single R session. - packrat::get_opts, packrat::set_opts: Get/set project-specific settings.

Manage ad-hoc local repositories (note that these are a separate entity from CRAN-like repositories): - packrat::set_opts(local.repos = ...) can be used to specify local repositories; that is, directories containing (unzipped) package sources. - packrat::install_local() installs packages available in a local repository.

For example, suppose I have the (unzipped) package sources for digest located within the folder~/git/R/digest/. To install this package, you can use:

packrat::set_opts(local.repos = "~/git/R")
packrat::install_local("digest")

There are also utility functions for using and managing packages in the external / user library, and can be useful for leveraging packages in the user library that you might not want as project-specific dependencies, e.g. devtools, knitr, roxygen2:

  • packrat::extlib(): Load an external package.
  • packrat::with_extlib(): With an external package, evaluate an expression. The external package is loaded only for the duration of the evaluated expression, but note that there may be other side effects associated with the package's .onLoad, .onAttach and .onUnload calls that we may not be able to fully control.

Workflows

Packrat supports a set of common analytic workflows:

  1. As-you-go: use packrat::init() to initialize packrat with your project, and use it to manage your project library while you develop your analysis. As you install and remove packages, you can use packrat::snapshot() and packrat::restore() to maintain the R packages in your project. For collaboration, you can either use your favourite version control system, or use packrat::bundle() to generate a bundled version of your project that collaborators can use with packrat::unbundle().

  2. When-you're-done: take an existing or complete analysis (preferably collected within one directory), and call packrat::init() to immediately obtain R package sources for all packages used in your project, and snapshot that state so it can hence be preserved across time.

Setting up your own custom, CRAN-like repositories

Please view the set-up guide here for a simple walkthrough in how you might set up your own, local, custom CRAN repository.

Owner

  • Name: RStudio
  • Login: rstudio
  • Kind: organization
  • Email: info@rstudio.org
  • Location: Boston, MA

GitHub Events

Total
  • Create event: 9
  • Release event: 1
  • Issues event: 4
  • Watch event: 6
  • Delete event: 8
  • Issue comment event: 11
  • Push event: 19
  • Pull request review comment event: 4
  • Pull request review event: 7
  • Pull request event: 17
  • Fork event: 2
Last Year
  • Create event: 9
  • Release event: 1
  • Issues event: 4
  • Watch event: 6
  • Delete event: 8
  • Issue comment event: 11
  • Push event: 19
  • Pull request review comment event: 4
  • Pull request review event: 7
  • Pull request event: 17
  • Fork event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 1,579
  • Total Committers: 41
  • Avg Commits per committer: 38.512
  • Development Distribution Score (DDS): 0.368
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Kevin Ushey k****y@g****m 998
Aron Atkins a****n@g****t 119
Jonathan McPherson j****n@r****m 116
Toph Allen t****n@g****m 113
Joe Cheng j****e@r****g 65
JJ Allaire jj@r****g 55
Kirill Müller k****r@i****h 23
Roland Stevenson r****n@s****m 9
Alex Gold a****d@g****m 8
Barret Schloerke s****e@g****m 7
Cole Arendt c****t@o****m 7
itsakettle i****e@g****m 6
Christophe Dervieux c****x@g****m 5
María Medina m****p@g****m 4
Aaron Wells a****w@c****z 3
Javier Luraschi j****i@h****m 3
hadley h****m@g****m 3
Robert Krzyzanowski t****b@g****m 3
Matt Shirley m****5@g****m 3
Adam Robinson a****1@g****m 2
Bastiaan Quast b****t@g****m 2
Ken Williams K****s@W****m 2
ras44 r****n@g****m 2
shiosai s****i@g****t 2
slodge me@s****m 2
Bill Evans B****s@A****m 2
trestletech j****n@t****t 1
jwg4 j****4 1
Richard White r****e@g****m 1
Tarek Rached t****k@m****m 1
and 11 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 48
  • Total pull requests: 97
  • Average time to close issues: over 1 year
  • Average time to close pull requests: about 1 month
  • Total issue authors: 32
  • Total pull request authors: 11
  • Average comments per issue: 3.23
  • Average comments per pull request: 0.88
  • Merged pull requests: 78
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 20
  • Average time to close issues: 3 days
  • Average time to close pull requests: 9 days
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.45
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aronatkins (13)
  • toph-allen (4)
  • karawoo (2)
  • JsizzleR (1)
  • slhck (1)
  • colearendt (1)
  • jmcphers (1)
  • lucygarner (1)
  • pyltime (1)
  • Giqles (1)
  • PMassicotte (1)
  • kevinushey (1)
  • dlebauer (1)
  • renejuan (1)
  • galachad (1)
Pull Request Authors
  • aronatkins (66)
  • toph-allen (17)
  • galachad (3)
  • karawoo (3)
  • kevinushey (2)
  • cfmack (1)
  • Valdimus (1)
  • xhdong-umd (1)
  • hadley (1)
  • alexiswl (1)
  • colearendt (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 40,039 last-month
  • Total docker downloads: 2,594,587
  • Total dependent packages: 11
    (may contain duplicates)
  • Total dependent repositories: 81
    (may contain duplicates)
  • Total versions: 51
  • Total maintainers: 1
cran.r-project.org: packrat

A Dependency Management System for Projects and their R Package Dependencies

  • Versions: 25
  • Dependent Packages: 8
  • Dependent Repositories: 70
  • Downloads: 40,039 Last month
  • Docker Downloads: 2,594,587
Rankings
Forks count: 0.7%
Stargazers count: 0.9%
Downloads: 1.9%
Dependent repos count: 2.9%
Average: 5.1%
Dependent packages count: 6.6%
Docker downloads count: 17.6%
Maintainers (1)
Last synced: 10 months ago
proxy.golang.org: github.com/rstudio/packrat
  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.6%
Dependent repos count: 10.2%
Last synced: 10 months ago
conda-forge.org: r-packrat
  • Versions: 8
  • Dependent Packages: 3
  • Dependent Repositories: 11
Rankings
Dependent repos count: 10.7%
Dependent packages count: 15.6%
Average: 16.2%
Forks count: 18.7%
Stargazers count: 19.8%
Last synced: 10 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 3.0.0 depends
  • tools * imports
  • utils * imports
  • devtools * suggests
  • httr * suggests
  • knitr * suggests
  • mockery * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
tests/testthat/Ugly, but legal, path for a project (long)/breakfast/DESCRIPTION cran
  • oatmeal * depends
  • toast * depends
tests/testthat/Ugly, but legal, path for a project (long)/toast/DESCRIPTION cran
  • bread * depends
tests/testthat/packages/breakfast/DESCRIPTION cran
  • oatmeal * depends
  • toast * depends
tests/testthat/packages/toast/DESCRIPTION cran
  • bread * depends
tests/testthat/Ugly, but legal, path for a project (long)/bread/DESCRIPTION cran
tests/testthat/Ugly, but legal, path for a project (long)/oatmeal/DESCRIPTION cran
tests/testthat/Ugly, but legal, path for a project (long)/packrat/DESCRIPTION cran
tests/testthat/other-packages/packrat/DESCRIPTION cran
tests/testthat/packages/bread/DESCRIPTION cran
tests/testthat/packages/egg/DESCRIPTION cran
tests/testthat/packages/oatmeal/DESCRIPTION cran
tests/testthat/projects/emptydesc/DESCRIPTION cran