
Last chance! 50% off unlimited learning
Sale ends in
imgur_upload(file, key = "60e9e47cff8483c6dc289a1cd674b40f")
XML
which is a list
converted from the response XML file; see Imgur API in
the references.knit()
is HTML
or Markdown, this function can be used to upload local
image files to Imgur, e.g. set the package option
opts_knit$get(upload.fun = imgur_upload)
, so the
output document is completely self-contained, i.e. it
does not need external image files any more, and it is
ready to be published online.f = tempfile(fileext = ".png")
png(f)
plot(rnorm(100), main = R.version.string)
dev.off()
res = imgur_upload(f)
res # link to original URL of the image
attr(res, "XML") # all information
if (interactive())
browseURL(res$links$imgur_page) # imgur page
## to use your own key
opts_knit$set(upload.fun = function(file) imgur_upload(file, key = "your imgur key"))
Run the code above in your browser using DataLab