knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(pins)

Big picture

Key concepts:

These a realised differently for different backends:

Main API

v1.0.0

Still not sure how to connect user facing pin_write()/pin_read() docs with underlying pin_store()/pin_fetch() generics.

Transitional

These are from v0, but are close enough to v1 semantics that I haven't touched yet.

Probably should define pin_versions() and pin_delete() and have default method fall back.

Metadata

There are two versions of pins metadata:

Metadata versions are backward compatible, e.g. pins 1.0.0 can read versions 0 and 1. pins 1.0.0 and later will automatically throw an error recommending that you upgrade if it encounters a new metadata version.

In version 1 and greater you can identify the metadata version by consulting the "api_version" key. If it is absent, you can assume that you have version 0. read_meta() adds this automatically, and gives an informative error if you're reading a newer version than what is supported.

There are two major differences between version 0 and version 1:

pin_meta() retrieves metadata from the remote board and adds to it any additional data needed to manage the local cache, stored in the local element.



rstudio/pins documentation built on April 12, 2025, 6:59 p.m.