Skip to content

Pin metadata comes from three sources:

  • Standard metadata added by pin_upload()/pin_write(). This includes:

    • $name - the pin's name.

    • $file - names of files stored in the pin.

    • $file_size - size of each file.

    • $pin_hash - hash of pin contents.

    • $type - type of pin: "rds", "csv", etc

    • $title - pin title

    • $description - pin description

    • $tags - pin tags

    • $urls - URLs for more info on pin

    • $created - date this (version of the pin) was created

    • $api_version - API version used by pin

  • Metadata supplied by the user, stored in $user. This is untouched from what is supplied in pin_write()/pin_upload() except for being converted to and from to YAML.

  • Local metadata generated when caching the pin, stored in $local. This includes information like the version of the pin, and the path its local cache.

Usage

pin_meta(board, name, version = NULL, ...)

Arguments

board

A pin board, created by board_folder(), board_connect(), board_url() or another board_ function.

name

Pin name.

version

Retrieve a specific version of a pin. Use pin_versions() to find out which versions are available and when they were created.

...

Additional arguments passed on to methods for a specific board.

Value

A list.

Examples

b <- board_temp()
b |> pin_write(head(mtcars), "mtcars", metadata = list("Hadley" = TRUE))
#> Guessing `type = 'parquet'`
#> Creating new version '20260313T210907Z-c8df2'
#> Writing to pin 'mtcars'

# Get the pin
b |> pin_read("mtcars")
#> # A data frame: 6 × 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
# Get its metadata
b |> pin_meta("mtcars")
#> List of 13
#>  $ file       : chr "mtcars.parquet"
#>  $ file_size  : 'fs_bytes' int 2.02K
#>  $ pin_hash   : chr "c8df285b5d49c7cf"
#>  $ type       : chr "parquet"
#>  $ title      : chr "mtcars: a pinned 6 x 11 data frame"
#>  $ description: NULL
#>  $ tags       : NULL
#>  $ urls       : NULL
#>  $ created    : POSIXct[1:1], format: "2026-03-13 21:09:07"
#>  $ api_version: int 1
#>  $ user       :List of 1
#>   ..$ Hadley: logi TRUE
#>  $ name       : chr "mtcars"
#>  $ local      :List of 3
#>   ..$ dir    : 'fs_path' chr "/tmp/RtmpGqXXm7/pins-1d2a48258053/mtcars/20260313T210907Z-c8df2"
#>   ..$ url    : NULL
#>   ..$ version: chr "20260313T210907Z-c8df2"
# Get path to underlying data
b |> pin_download("mtcars")
#> [1] "/tmp/RtmpGqXXm7/pins-1d2a48258053/mtcars/20260313T210907Z-c8df2/mtcars.parquet"

# Use tags instead
b |> pin_write(tail(mtcars), "mtcars", tags = c("fuel-efficiency", "automotive"))
#> Guessing `type = 'parquet'`
#> Replacing version '20260313T210907Z-c8df2' with
#> '20260313T210907Z-627e6'
#> Writing to pin 'mtcars'
b |> pin_meta("mtcars")
#> List of 13
#>  $ file       : chr "mtcars.parquet"
#>  $ file_size  : 'fs_bytes' int 2.04K
#>  $ pin_hash   : chr "627e6be766bf57af"
#>  $ type       : chr "parquet"
#>  $ title      : chr "mtcars: a pinned 6 x 11 data frame"
#>  $ description: NULL
#>  $ tags       : chr [1:2] "fuel-efficiency" "automotive"
#>  $ urls       : NULL
#>  $ created    : POSIXct[1:1], format: "2026-03-13 21:09:07"
#>  $ api_version: int 1
#>  $ user       : list()
#>  $ name       : chr "mtcars"
#>  $ local      :List of 3
#>   ..$ dir    : 'fs_path' chr "/tmp/RtmpGqXXm7/pins-1d2a48258053/mtcars/20260313T210907Z-627e6"
#>   ..$ url    : NULL
#>   ..$ version: chr "20260313T210907Z-627e6"