imgur_off: Close an Imgur-linked plotting device and upload image

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/imguR.R

Description

This function closes the specified graphics device uploads the plot(s) to Imgur.

Usage

1
imgur_off(obj, ...)

Arguments

obj

An object of class “imgur_device”.

...

Additional arguments passed to upload_image.

Details

This function takes the output object from imgur as its first argument, wraps dev.off to close the graphics device opened by imgur, and uploads the device's image to Imgur via upload_image. If dev.off has already closed the device, that step is skipped to prevent errors.

Value

The response from upload_image.

Author(s)

Thomas J. Leeper, based on code by Aaron Statham.

See Also

imgur

upload_image

Examples

1
2
3
4
5
6
## Not run: 
i <- imgur('png')
hist(rnorm(20))
imgur_off(i)

## End(Not run)


imguR documentation built on May 20, 2017, 5:48 a.m.
Search within the imguR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.