Getting started
ry is a language server, checker, formatter, and console for R, written in Rust. It works on the code you already have, with nothing to annotate or configure first.
Install
Section titled “Install”- VS Code: install the extension, which bundles the binary for Linux x86_64, macOS on Apple silicon, and Windows x86_64.
- Command line: download
0.3.1-beta, or build it with
cargo install --git https://github.com/felix-andreas/ry ry-lang. - Linux: the 0.3.1-beta binary, also the one the extension bundles, starts only under Nix, so
build from source and point the extension’s
ry.pathsetting at it. - Zed, RStudio, other platforms: see installation.
Run it
Section titled “Run it”In a project directory:
ry checkunresolved
! I could not resolve `ratee` in this package, its imports, or builtins. Did you mean `rate`? --[R/discount.R:2:11] 1 | apply_discount <- function(price, rate) { 2 | price * ratee | ^^^^^Files under R/ are read as a package and share one namespace, as R loads them. Every other file is
a script, read from top to bottom, that can use the package’s functions. To also report type errors,
add a ry.toml:
[check]typing = true- Tour: every feature, and why it works the way it does
- Limitations: what is not checked, and the known false reports
- Configuration: every
ry.tomlkey