Skip to content

Raven documentation

Raven is a static analyzer and language server for R. Start with Getting started, or pick a topic below.

Prefer search? The same pages are on the documentation site.

Start here

Analysis

  • Diagnostics: What Raven reports, how to silence or tune it, and a reference for every diagnostic code.
  • Cross-file analysis: How Raven follows source() chains and resolves paths across files.
  • Non-standard evaluation: How Raven handles dplyr-style column names, and what to do when it can't.
  • Package development: How Raven analyzes R packages: visibility between R/ and tests/, NAMESPACE, and build commands.
  • box and import modules: How Raven models box::use() and import::from() imports.
  • .Rprofile startup files: How Raven accounts for definitions in a project .Rprofile.
  • Linting: Opt-in style rules, configured with raven.toml, .lintr, or VS Code settings.
  • Indentation: How Raven indents R code as you type, and the styles you can choose.
  • Completion: Completions for symbols, packages, arguments, $ fields, and file paths.
  • Hover: What hover shows for functions, variables, and package symbols.
  • Go to definition: Jump to where a symbol is defined, across files and into packages.
  • Find references: Find every use of a symbol across your project.
  • Document outline: The outline and breadcrumbs: sections, functions, and classes.
  • Syntax highlighting: Semantic highlighting for R, plus JAGS and Stan grammars.
  • Snippets: The R code snippets Raven provides.

R session (VS Code)

  • R console: Run R in VS Code and send code from the editor.
  • Console key bindings: What the emacs and vi editing styles mean, and their keys.
  • Debugger: Breakpoints, stepping, and variables for R scripts and documents.
  • Plot viewer: View, browse, and save plots in a VS Code panel.
  • Data viewer: Browse, sort, and filter data frames of any size with View().
  • Help viewer: Read R help for the function actually in scope.

R Markdown and Quarto

Reference

  • Directives: # raven: comments that declare symbols, relationships, and suppressions.
  • Configuration: How settings, raven.toml, and .lintr combine, and where Raven looks for them.
  • Settings reference: Every setting, alphabetically, with its default and raven.toml key.
  • Command line: raven check, raven lint, raven packages, and the language server command.
  • Keybindings: Chunk and console shortcuts compared with RStudio, Quarto, and vscode-R.

Understanding Raven

Help

  • Troubleshooting: A step-by-step procedure for when Raven misbehaves, and what to include in a bug report.
  • FAQ: Short answers to common questions.

More