the first type checker for R · written in rust

Modern developer tooling for R.

Roughly is a fast, Rust-built toolchain — a static type checker, a language server, and a formatter in one. It catches type errors before you run your code, works in your editor, and changes nothing about the R you already have.

three tools, one binary

Three tools, one binary.

Built for R users who have outgrown RStudio: editor smarts, problem-catching analysis, and one consistent style from a single binary. R has world-class statistics — Roughly brings the IDE-grade tooling other ecosystems already take for granted, fast enough to scale past 300k lines.

Language server

Completion, hover, go-to-definition, references, rename, and inlay hints — live in your editor.

Language server

Code analyzer

Lint diagnostics on by default — plus the first static type checker for R, opt-in.

Type checker

Formatter

roughly fmt rewrites your whole project to one consistent style, with a --diff mode for CI.

Formatter

write

IDE features in your editor.

Completion, hover, go-to-definition, find references, rename, and inlay hints. Ships as a VS Code extension and speaks LSP, so it drops into any editor that does too.

model.R
df <- read_csv("data.csv")
df$count
Language server docs

check

Code analysis.

Lint diagnostics run by default, flagging problems before you even run your code. Go deeper with the first static type checker for R — automatic inference checks most of your code with zero annotations, and the type checker stays opt-in.

model.R
#: fn(count: integer) -> integer
double_count <- function(count) count + count
double_count("two")
# error[type-error] expected integer, found character

ship

One consistent style.

Scrappy R reflows into a consistent shape in place — one-line loop bodies get braced and indented, cramped operators and commas get their spaces back, and drifting multi-line indentation snaps to the grid. Deliberate line breaks are respected: roughly fmt never splits a line you chose to keep. It rewrites the whole project (and --diff for CI).

retry.R · roughly fmt
Before: for (i in seq) log(i); while (busy) wait(). After: each one-line loop body is wrapped in braces and indented.
Formatter docs

adopt

Drop it onto your R project.

Nothing about your existing R has to change. Install the VS Code extension in one click — no toolchain required — or grab the CLI and point Roughly at your project.

# install the CLI
cargo install --git https://github.com/felix-andreas/roughly roughly
# format, lint, and type-check
roughly fmt .
roughly check .

Grab the VS Code extension from the Marketplace, then tune behavior in configuration.