Fast Package and Project Manager

Manages the packages and the R version of a project. Packages are resolved from dated snapshots of the 'Posit Package Manager' < https://packagemanager.posit.co> and recorded in a lockfile, so that a project can be reproduced as it was. The work is done by the 'rok' command-line program, which this package downloads from the project's 'GitHub' releases on first use, after asking for user consent.


rok rok logo

rok is a fast package and project manager for R, in the spirit of uv for Python. A project declares the packages it uses in rok.toml; rok resolves them from a dated snapshot of the Posit Package Manager, records the exact versions in rok.lock, and links them into a project library from a shared cache. The project can then be reproduced as it was, on Linux, Windows and macOS (experimental).

This package is the R front end of the rok command-line program, which does the work. The first init() (or setup()) downloads the program from the project's GitHub releases, after asking.

Installation

pak::pak("rok")

# or
# install.packages("rok")

Quick start

# Create a project in the working directory (after asking)
rok::init()

# Declare, resolve, lock and install packages
rok::add("fixest", "sf")

# Pin GitHub packages to a commit
rok::add("gaborcsardi/praise")

# Take packages from another CRAN-like repository, by its URL
rok::add("polars", repo = "https://community.r-multiverse.org")

# Check what is out of sync
rok::status()

# Move to the latest snapshot, showing what changes
rok::update()

# Undo the last change
rok::undo()

Functions are meant to be called as rok::add(); update() and remove() mask stats::update() and base::remove() when the package is attached, and transparently forward calls meant for them.

See https://github.com/yo5uke/rok for the command-line program and more.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rok")

0.2.0 by Yosuke Abe, 10 hours ago


https://github.com/yo5uke/rok


Report a bug at https://github.com/yo5uke/rok/issues


Browse source code at https://github.com/cran/rok


Authors: Yosuke Abe [aut, cre, cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports tools, utils


See at CRAN