Learn R Programming

pins (version 1.2.1)

pin_meta: Retrieve metadata for a pin

Description

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

    • $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, ...)

Value

A list.

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.

Examples

Run this code
b <- board_temp()
b %>% pin_write(head(mtcars), "mtcars", metadata = list("Hadley" = TRUE))

# Get the pin
b %>% pin_read("mtcars")
# Get its metadata
b %>% pin_meta("mtcars")
# Get path to underlying data
b %>% pin_download("mtcars")

# Use tags instead
b %>% pin_write(tail(mtcars), "mtcars", tags = c("fuel-efficiency", "automotive"))
b %>% pin_meta("mtcars")

Run the code above in your browser using DataLab