The Carbon generator creates a new Carbon-object, which is the class containing all the app logic. The class is based on the R6 OO-system and is thus reference-based with methods and data attached to each object, in contrast to the more well known S3 and S4 systems.

Initialization

A new 'Carbon'-object is initialized using the new() method on the generator:

x <- carbon$new(code = clipr::read_clip())

Fields


Public Fields

Description of fields of the R6 object that can be set by the user can be found in the following page.

Methods


Interacting with Browser

$carbonateUsing RSelenium fetch the carbon image output
$browseopen $uri in the browser


Aesthetics

$set_templateset $template
$get_templatesget a list of possible templates
$set_window_control_themeset $windows_control_theme
$get_windows_control_themesget a list of possible window control themes
$set_font_familyset $font_family
$get_font_familiesget a list of possible fonts


URI Building

$uriconstruct valid carbon.js uri
$optionsreturn all current carbon options
$encodeURL encode a string for the $uri
$tinyCreate tinyurl from $uri
$rtweetSend tweets containing media generated from carbon


Webdriver Settings

$chromeOptionsconstruct a chromeOptions object
$chrome_startstart a chrome session
$chrome_stopstop a chrome session
$startstart a RSelenium session
$stopstop a RSelenium session
$stop_allstop all active RSelenium sessions