pb_write | R Documentation |
A convenience wrapper around writing an object to a temporary file and then uploading to a specified repo/release.
pb_write(
x,
file,
...,
repo = guess_repo(),
tag = "latest",
write_function = guess_write_function(file),
.token = gh::gh_token()
)
x |
object: memory object to save to piggyback |
file |
string: file name |
... |
additional arguments passed to |
repo |
string: GH repository name in format "owner/repo". Default
|
tag |
string: tag for the GH release, defaults to "latest" |
write_function |
function: used to write an R object to file, where the
object is passed as the first argument, the filename as the second argument,
and any additional arguments are subsequently passed in via |
.token |
GitHub authentication token, see |
Writes file to release and returns github API response
Other pb_rw:
guess_read_function()
,
guess_write_function()
,
pb_read()
pb_write(mtcars, "mtcars.rds", repo = "tanho63/piggyback-tests")
#> ℹ Uploading to latest release: "v0.0.2".
#> ℹ Uploading mtcars.rds ...
#> |===============================================================| 100%
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.