How pins and boards work together
mainThe pins package allows you to publish data, models, and other R objects to shared locations called boards.
A board is an abstraction representing a storage backend (e.g., a local folder, Posit Connect, Amazon S3, Google Cloud Storage, etc.). Once a board is initialized, you use it to write (pin) or read objects.
Key workflow:
- Create a board: Initialize a board object using functions like
board_folder()orboard_connect(). - Pin an object: Use
pin_write()to save an object to the board with a specific name. - Read an object: Use
pin_read()to retrieve the object from the board using its name.
library(pins)
# 1. Create a board
board <- board_temp()
# 2. Pin an object
board |> pin_write(head(mtcars), "mtcars")
# 3. Read the object
board |> pin_read("mtcars")