View source: R/pin-upload-download.R
pin_download | R Documentation |
This is a lower-level interface than pin_read()
and pin_write()
that
you can use to pin any file, as opposed to any R object. The path returned
by pin_download()
is a read-only path to a cached file: you should never
attempt to modify this file.
pin_download(board, name, version = NULL, hash = NULL, ...)
pin_upload(
board,
paths,
name = NULL,
...,
title = NULL,
description = NULL,
metadata = NULL,
tags = NULL,
urls = NULL
)
board |
A pin board, created by |
name |
Pin name. |
version |
Retrieve a specific version of a pin. Use |
hash |
Specify a hash to verify that you get exactly the dataset that
you expect. You can find the hash of an existing pin by looking for
|
... |
Additional arguments passed on to methods for a specific board. |
paths |
A character vector of file paths to upload to |
title |
A title for the pin; most important for shared boards so that others can understand what the pin contains. If omitted, a brief description of the contents will be automatically generated. |
description |
A detailed description of the pin contents. |
metadata |
A list containing additional metadata to store with the pin.
When retrieving the pin, this will be stored in the |
tags |
A character vector of tags for the pin; most important for discoverability on shared boards. |
urls |
A character vector of URLs for more info on the pin, such as a link to a wiki or other documentation. |
pin_download()
returns a character vector of file paths;
pin_upload()
returns the fully qualified name of the new pin, invisibly.
board <- board_temp()
board %>% pin_upload(system.file("CITATION"))
path <- board %>% pin_download("CITATION")
path
readLines(path)[1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.