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
renvfor dependency locking, withpakas its recommended installer backend- The Spade CLI installed (Installation guide)
Dependencies🔗
A collection declares its CRAN dependencies in a DESCRIPTION file under Imports::
Imports:
jsonlite,
yamlRunning renv::snapshot() resolves those declared dependencies (using pak under the hood for fast, parallel installs) and records the exact versions into renv.lock at the collection root:
install.packages("jsonlite")
renv::snapshot()renv.lock is the file spade install and the registry's build step actually read to reproduce the collection's library -- DESCRIPTION is where you declare what you depend on, renv.lock is the resolved, reproducible record of it.
Installation🔗
install.packages("spade")
renv::snapshot()Quickstart
Create your first R block step by step.
Read →Types
All available Spade types in the R library.
Read →Handler Functions
Writing R handler functions with type annotations.
Read →Manifest Generation
Auto-generating block manifests from R type annotations.
Read →Examples
Complete worked examples of R blocks.
Read →