pin_versions: Pin Versions

Description Usage Arguments Examples

View source: R/pin.R

Description

Retrieve versions available for a given pin.

Usage

1
pin_versions(name, board = NULL, full = FALSE, ...)

Arguments

name

The exact name of the pin to match when searching.

board

The board name used to find the pin.

full

Should the full versioned paths be shown? Defaults to FALSE.

...

Additional parameters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(pins)

# define local board with versioning enabled
board_register_local(cache = tempfile(), versions = TRUE)

# cache the mtcars dataset
pin(mtcars, name = "mtcars")

# cache variation of the mtcars dataset
pin(mtcars * 10, name = "mtcars")

# print the mtcars versions
versions <- pin_versions("mtcars") %>% print()

# retrieve the original version
pin_get("mtcars", version = versions$version[1])

# retrieve the variation version
pin_get("mtcars", version = versions$version[2])

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