Retrieve versions available for a given pin.

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

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()
#> # A tibble: 2 x 1 #> version #> <chr> #> 1 b71358b #> 2 2a99037
# retrieve the original version pin_get("mtcars", version = versions$version[1])
#> # A tibble: 32 x 11 #> mpg cyl disp hp drat wt qsec vs am gear carb #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 210 60 1600 1100 39 26.2 165. 0 10 40 40 #> 2 210 60 1600 1100 39 28.8 170. 0 10 40 40 #> 3 228 40 1080 930 38.5 23.2 186. 10 10 40 10 #> 4 214 60 2580 1100 30.8 32.2 194. 10 0 30 10 #> 5 187 80 3600 1750 31.5 34.4 170. 0 0 30 20 #> 6 181 60 2250 1050 27.6 34.6 202. 10 0 30 10 #> 7 143 80 3600 2450 32.1 35.7 158. 0 0 30 40 #> 8 244 40 1467 620 36.9 31.9 200 10 0 40 20 #> 9 228 40 1408 950 39.2 31.5 229 10 0 40 20 #> 10 192 60 1676 1230 39.2 34.4 183 10 0 40 40 #> # … with 22 more rows
# retrieve the variation version pin_get("mtcars", version = versions$version[2])
#> # A tibble: 32 x 11 #> mpg cyl disp hp drat wt qsec vs am gear carb #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # … with 22 more rows