.carbonate | R Documentation |
Main function of the package that invokes RSelenium to open a browser to the carbon.js uri, create an image and download the file.
.carbonate(self, private, file, path, code, rD, driver)
self |
carbon self object |
private |
carbon private object |
file |
character, name of file to save image as |
path |
character, path to save the image |
code |
character, lines of script to make carbon image from |
rD |
RSelenium driver |
driver |
character, select either 'firefox' or 'chrome' driver |
Script is passed to https://carbon.now.sh/ is downloaded to the tempdir()
and appended to the list $carbons using RSelenium and Chrome.
image object
carbon, rsDriver
if(interactive()){ x <- carbon$new('x <- 1') x$carbonate() }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.