R

The R library lets you write Spade blocks using familiar R patterns — reading YAML, processing data with base R or tidyverse packages, and writing results. Type annotations use R's S4 class system via simple attributes.

Prerequisites🔗

  • R 4.0 or later
  • pak installed (install.packages("pak")) -- spade install uses it internally to resolve and install dependencies
  • The Spade CLI installed (Installation guide)

Dependencies🔗

A collection declares its CRAN dependencies in a DESCRIPTION file under Imports::

Imports:
    jsonlite,
    yaml

There's no separate lock step to run yourself. spade install (and the equivalent cloud build step) resolves Imports: into a pkg.lock file automatically, via pak::lockfile_create(), then installs from it with pak::lockfile_install(). If your collection already has a committed pkg.lock, that exact resolution is reused instead of being regenerated -- DESCRIPTION is where you declare what you depend on, pkg.lock is the resolved, reproducible record of it.

Installation🔗

install.packages("spadelib")