imgur {imguR} | R Documentation |
Initiate an Imgur-enabled Graphics Device
Description
Open a specified graphics device function an configure it to upload to Imgur
Usage
imgur(device = png, file = NULL, title = NULL, description = NULL,
album = NULL, name = NULL, key = NULL, token = NULL, ...)
Arguments
device |
A graphics device function. Default is |
file |
Name of the file to be uploaded to imgur.com |
title |
Optionally, an image title. |
description |
Optionally, an image description. |
album |
Optionally, an Imgur album ID. |
name |
Optionally, a file name, otherwise the |
key |
An API key. If |
token |
Optionally, an OAuth2.0 token (returned by |
... |
Other arguments passed to the specified device function. |
Details
This package is a wrapper for the pdf
function. A temporary file is created by pdf
, acting as normal
graphical device. After plotting, when dev.off
is called, the file is closed, uploaded to imguR and a URL of
the files location is returned. In the case of multipaged pdfs being uploaded, imguR automatically concatenates them
into a single image.
Value
An object of class “imgur_device” to be passed to imgur_off
.
Author(s)
Thomas J. Leeper, based on code by Aaron Statham.
See Also
Examples
## Not run:
i <- imgur('png')
hist(rnorm(20))
imgur_off(i)
## End(Not run)