pin_get: Retrieve Pin

Description Usage Arguments Details Examples

View source: R/pin.R

Description

Retrieves a pin by name from the local or given board.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pin_get(
  name,
  board = NULL,
  cache = TRUE,
  extract = NULL,
  version = NULL,
  files = FALSE,
  signature = NULL,
  ...
)

Arguments

name

The name of the pin.

board

The board where this pin will be retrieved from.

cache

Should the pin cache be used? Defaults to TRUE.

extract

Should compressed files be extracted? Each board defines the default behavior.

version

The version of the dataset to retrieve, defaults to latest one.

files

Should only the file names be returned?

signature

Optional signature to validate this pin, use pin_info() to compute signature.

...

Additional parameters.

Details

pin_get() retrieves a pin by name and, by default, from the local board. You can use the board parameter to specify which board to retrieve a pin from. If a board is not specified, it will use pin_find() to find the pin across all boards and retrieve the one that matches by name.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(pins)

# define local board
board_register_local(cache = tempfile())

# cache the mtcars dataset
pin(mtcars)

# retrieve the mtcars pin
pin_get("mtcars")

# retrieve mtcars pin from packages board
pin_get("easyalluvial/mtcars2", board = "packages")

pins documentation built on Jan. 8, 2021, 2:28 a.m.