Skip to content
A fresh approach to package installation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Omit message about packages not updated May 10, 2019
docs Update URL in DESCRIPTION Feb 16, 2019
inst Spell check Feb 16, 2019
man README updates, pak_setup() Feb 16, 2019
tests Break out pkgdepends Feb 25, 2019
tools/images README updates, pak_setup() Feb 16, 2019
.Rbuildignore Break out pkginstall Feb 25, 2019
.gitignore Use README.Rmd Feb 15, 2019
.travis.yml Require R 3.2.x for now Jan 12, 2019
DESCRIPTION Make Gábor the first author Apr 10, 2019
Makefile Use README.Rmd Feb 15, 2019
NAMESPACE README updates, pak_setup() Feb 16, 2019
NEWS.md Bump version to 0.1.2 Feb 4, 2019
README.Rmd
README.md Fix Appveyor badge URL Feb 16, 2019
_pkgdown.yml README updates, pak_setup() Feb 16, 2019
appveyor.yml Add Appveyor, run covr() on Travis Jan 11, 2018
codecov.yml Add codecov config Feb 4, 2018
pkg.Rproj Adding .Rproj into the folder for easier export in RStudio Jan 19, 2019

README.md

pak

A Fresh Approach to R Package Installation

lifecycle Linux Build Status Windows Build status CRAN RStudio mirror downloads Coverage Status

pak installs R packages from CRAN, Bioconductor, GitHub, and local files and directories. It is an alternative to install.packages() and devtools::install_github(). pak is fast, safe and convenient.

Installation

Install the package from CRAN:

install.packages("pak")

(After installation, you might also want to run pak::pak_setup(); it’ll be run automatically when needed but you might want to do it now to save some time later.)

Usage

Call pkg_install() to install CRAN or Bioconductor packages:

pak::pkg_install("usethis")

To install GitHub packages, use the user/repo syntax:

pak::pkg_install("r-lib/usethis")

All dependencies will be installed as well, to the same library.

Why pak?

Fast

  • Fast downloads and HTTP queries. pak performs all HTTP requests concurrently.

  • Fast installs. pak builds and installs packages concurrently.

  • Metadata and package cache. pak caches package metadata and all downloaded packages locally. It does not download the same package files over and over again.

  • Lazy installation. pak only installs the packages that are really necessary for the installation. If the requested package and its dependencies are already installed, pak does nothing.

Safe

  • Private library (pak’s own package dependencies do not affect your regular package libraries and vice versa).

  • Every pak operation runs in a sub-process, and the packages are loaded from the private library. pak avoids loading packages from your regular package libraries. (These package files would be locked on some systems, and locked packages cannot be updated. pak does not load any package in the main process, except for pak itself).

  • To avoid updating locked packages, pak warns and requests confirmation for loaded packages.

  • Dependency solver. pak makes sure that you end up in a consistent, working state of dependencies. If finds conflicts up front, before attempting installation.

Convenient

  • BioC packages. pak supports Bioconductor packages out of the box. It uses the Bioconductor version that is appropriate for your R version.

  • GitHub packages. pak supports GitHub packages out of the box. It also supports the Remotes entry in DESCRIPTION files, so that GitHub dependencies of GitHub packages will also get installed. See e.g. https://cran.r-project.org/package=remotes/vignettes/dependencies.html

  • Package sizes. For CRAN packages pak shows the total sizes of packages it needs to download.

Roadmap

  • Support GitLab repositories
  • Support Bitbucket repositories
  • Support package URLs
  • Support system requirements
  • Support older CRAN package versions
  • Support older BioConductor package versions
  • Support GitHub pull requests
  • Support local CRAN mirrors
  • Support the Additional_repositories DESCRIPTION field
  • Support SVN repos

License

GPL-3 © RStudio

You can’t perform that action at this time.