Learn R Programming

pins (version 0.4.5)

pin_versions: Pin Versions

Description

Retrieve versions available for a given pin.

Usage

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

Run this code
# NOT RUN {
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])
# }

Run the code above in your browser using DataLab