Package carbonate. R topics documented: October 14, 2018

Similar documents
Package slickr. March 6, 2018

Package wdman. January 23, 2017

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package jstree. October 24, 2017

Package canvasxpress

Package messaging. May 27, 2018

Package robotstxt. November 12, 2017

Package facerec. May 14, 2018

Package fastdummies. January 8, 2018

Package validara. October 19, 2017

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package texpreview. August 15, 2018

Package clipr. June 23, 2018

Package barcoder. October 26, 2018

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package essurvey. August 23, 2018

Package memery. February 13, 2018

Package internetarchive

Package sigmanet. April 23, 2018

Package meme. November 2, 2017

Package meme. December 6, 2017

Package WordR. September 7, 2017

Package data.world. April 5, 2018

Package knitrprogressbar

Package qualmap. R topics documented: September 12, Type Package

Package docxtools. July 6, 2018

Package ECctmc. May 1, 2018

Package dkanr. July 12, 2018

Package datasets.load

Package spark. July 21, 2017

Package processanimater

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package opencage. January 16, 2018

Package shiny.semantic

Package datapasta. January 24, 2018

Package tabulizer. June 7, 2018

Package kdtools. April 26, 2018

Package shinyhelper. June 21, 2018

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package goodpractice

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package calpassapi. August 25, 2018

Package tiler. June 9, 2018

Package SEMrushR. November 3, 2018

Package gtrendsr. October 19, 2017

Package rzeit2. January 7, 2019

Package ezknitr. September 16, 2016

Package patentsview. July 12, 2017

Package editdata. October 7, 2017

Package pdfsearch. July 10, 2018

Package liftr. R topics documented: May 14, Type Package

Package projector. February 27, 2018

Package radix. September 17, 2018

Package httpcache. October 17, 2017

Package available. November 17, 2017

Package semver. January 6, 2017

Package shinyfeedback

Package githubinstall

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package d3plus. September 25, 2017

Package gtrendsr. August 4, 2018

Package postgistools

Package shinytest. May 7, 2018

Package revealjs. R topics documented: March 13, Type Package

Package rcmdcheck. R topics documented: November 10, 2018

Package virustotal. May 1, 2017

Package wikitaxa. December 21, 2017

Package fitbitscraper

Package htmlwidgets. July 10, 2017

Package rsppfp. November 20, 2018

Package condusco. November 8, 2017

Package rnaturalearth

Package ssh. June 4, 2018

Package GetITRData. October 22, 2017

Package modules. July 22, 2017

Package collapsibletree

Package spelling. December 18, 2017

Package censusapi. August 19, 2018

Package htmlwidgets. February 25, 2016

Package bigqueryr. October 23, 2017

Package nima. May 23, 2018

Package guardianapi. February 3, 2019

Package bisect. April 16, 2018

Package fastrtext. December 10, 2017

Package dbx. July 5, 2018

Package tfruns. February 18, 2018

Package statsdk. September 30, 2017

Package jpmesh. December 4, 2017

Package sfdct. August 29, 2017

Package nmslibr. April 14, 2018

Package aws.transcribe

Package repec. August 31, 2018

Package rwars. January 14, 2017

Package embed. November 19, 2018

Package cloudml. June 12, 2018

Package stapler. November 27, 2017

Package smapr. October 20, 2017

Package lumberjack. R topics documented: July 20, 2018

Transcription:

Package ate October 14, 2018 Title Interact with '.js' Version 0.1.0 Create beautiful images of source code using '.js'<https://.now.sh/about>. Depends R (>= 3.2.0) License MIT + file LICENSE Encoding UTF-8 LazyData true RoxygenNote 6.1.0 Imports R6, clipr, magick, wdman, RSelenium, utils, httr, rtweet, yaml Suggests testthat, covr, knitr, rmarkdown URL https://github.com/yonicd/ate BugReports https://github.com/yonicd/ate/issues VignetteBuilder knitr NeedsCompilation no Author Jonathan Sidi [aut, cre] (<https://orcid.org/0000-0002-4222-1819>) Maintainer Jonathan Sidi <yonicd@gmail.com> Repository CRAN Date/Publication 2018-10-14 17:10:05 UTC R topics documented:.browse........................................... 2.ate.......................................... 2.chromeOptions....................................... 3.encode........................................... 4.get_windows_control_themes............................... 4.options........................................... 5.rtweet............................................ 6.set_template........................................ 7 1

2.ate.start............................................. 7.tiny............................................. 8.uri.............................................. 9............................................ 9 _fields........................................ 10 tinyurl............................................ 12 Index 13.browse open $uri to in browser window opens the uri address in $uri in the browser window..browse(, ) object object Examples x <- $new('x <- 1') if(interactive()) x$browse().ate Carbonate script lines to a image Main function of the package that invokes RSelenium to open a browser to the.js uri, create an image and download the file..ate(,, file, path, code, rd)

.chromeoptions 3 file path code rd object object character, name of file to save image as character, path to save the image character, lines of script to make image from RSelenium driver Details Value Script is passed to https://.now.sh/ is downloaded to the tempdir() and appended to the list $s using RSelenium and Chrome. image object, rsdriver Examples if(interactive()){ x <- $new('x <- 1') x$ate() }.chromeoptions chrome webdriver functions Functions to open,close,set chrome webdriver.chromeoptions(, ).chrome_start(, ).chrome_stop(, ) object object

4.get_windows_control_themes, chrome.encode encode uri for.js encode uri string for.js. Augmented version of than URLencode.encode(,, URL, reserved, repeated) URL reserved repeated object object character, uri string to url encode boolean, should reserved characters be encoded? boolean, should apparently already-encoded URLs be encoded again? Value character URLencode,.get_windows_control_themes get functions function that gets the available list of aesthetic values of fields.get_windows_control_themes(, ).get_font_families(, ).get_templates(, )

.options 5 object object.options concatenate the options to a string combine all the options into a.js valid string.options(,, code) code object object character, script to embbed into the uri Value OUTPUT_DESCRIPTION

6.rtweet.rtweet send tweets using ate outputs wrapper for post_tweet to send tweets with media created using ate..rtweet(,, media, status = $tweet_status, media_format = c("png", "gif"),...) object object media magick-image object or path to image status character, status to attach to post, Default: $tweet_status media_format character, type of media to tweet, Default: c( png, gif )... arguments to pass to post_tweet Details If multiple images are passed they can be either converted to a gif by setting media_format to gif or attached each one to the post. Value outcome from rtweet image_write post_tweet Examples ## Not run: x <- ate::$new() x$ate(code = readlines(system.file('description',package='ate'))) x$ate(code = 'x+2') # using default status value (x$tweet_status) x$rtweet(system.file('figures/hex_black_small.png',package='ate')) x$rtweet(status = 'these are two pngs',media = x$s,media_format='png') x$rtweet(status = 'this is a gif', media = x$s,media_format='gif') ## End(Not run)

.set_template 7.set_template set functions function that set the aesthetics of the image output.set_template(,, template).set_window_control_theme(,, theme).set_font_family(,, family) template theme family object object character, name of template to set $template to character, theme to set $theme to character, font family to set $font_family to.start RSelenium webdriver functions Functions to open,stop, stop_all RSelenium sessions.start(,, ecap).stop(, ).stop_all(, )

8.tiny ecap object object chromeoptions passed into rsdriver.tiny convert uri to tinyurl convert uri to tinyurl with option to attach to clipboard..tiny(,, clip = FALSE) clip object object boolean, write tinyurl to clipboard, Default: FALSE Details If clip is set to TRUE write_clip will put the tinyurl on the clipboard. Value character

.uri 9.uri URI constructor Function that is called in a object to construct valid uri to send to browser.uri(,, code) code object object character, script to embbed into the uri Examples if(interactive()){ x <- $new('x <- 1') # populate from $code x$uri() # enter manually x$uri(code = 'x <- y + 3') } Carbon R6 class 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:

10 _fields x <- $new(code = clipr::read_clip()) Fields of fields of the R6 object that can be set by the user can be found in the following page. Methods $ate $browse Using RSelenium fetch the image output open $uri in the browser $set_template $get_templates $set_window_control_theme $get_windows_control_themes $set_font_family $get_font_families set $template get a list of possible templates set $windows_control_theme get a list of possible window control themes set $font_family get a list of possible fonts $uri $options $encode $tiny $rtweet construct valid.js uri return all current options URL encode a string for the $uri Create tinyurl from $uri Send tweets containing media generated from $chromeoptions $chrome_start $chrome_stop $start $stop $stop_all construct a chromeoptions object start a chrome session stop a chrome session start a RSelenium session stop a RSelenium session stop all active RSelenium sessions _fields Carbon object fields Fields that can be changed in the Carbon object code character, script to embbed, Default: NULL

_fields 11 palette numeric, layout pallete, Default: c(r=171,g=184,b=195,a=1) template character, layout template, Default: seti add_window_control boolean, add/remove window controls (circles on top left corner), Default: TRUE window_control_theme character, change window control themes, Default: none language character, language, Default: r add_drop_shadow boolean, add/remove dropshadow, Default: TRUE drop_shadow_offset_y numeric, shadow vertical offset (px), Default: 20 drop_shadow_blur_radius numeric, shadow blur radius (px), Default: 68 auto_adjust_width boolean, auto-audjust output width, Default: TRUE padding_vertical numeric, vertical padding (px), Default: 48 padding_horizontal numeric, horizontal padding (px), Default: 32 add_line_number boolean, add/remove line numbers, Default: FALSE font_family character, layout font family, Default: Hack font_size numeric, font size (px), Default: 14 line_height_percent numeric, relative space between lines (percent), Default: 133 square_image boolean, output image is square, Default: FALSE relative_export_size numeric, image size in export relative to what is in the preview (1,2 or 4), Default: 1 add_watermark boolean, add official.js watermark, Default: FALSE add_tinyurl boolean, add tinyurl link to image directing to the page that created the image, Default: FALSE tinyurl_location character, string with gravity value to place the annotate tinyurl address on image, Default: southeast tweet tweet_status add_timestamp s download_path boolean, tweet out the image using post_tweet character, status to add to the tweet. If add_tinyurl is TRUE then a link to the url will be appended to the status automatically, Default: Created in R using the Carbonate (Package Icon) boolean, add timestamp to output filename, Default: FALSE list, storage of rendered images, Default: NULL character, path to download the images, Default: tempdir()

12 tinyurl chrome_args character, arguments passed to chrome browser, Default: c( disable-gpu, window-size=1280,800 ) chrome_pref rd cdrv list, preferences passed to chrome browser, Default: list("profile.default_content_settings.popups" = 0L,"download.prompt_for_download" = FALSE,"download.default_directory" = tempdir()) RSelenium Driver object Chrome Driver object from wdman tinyurl convert uri to tinyurl convert uri to tinyurl. tinyurl(uri) uri character, the uri to convert Value character

Index Topic datasets, 9.browse, 2.ate, 2.chromeOptions, 3.chrome_start (.chromeoptions), 3.chrome_stop (.chromeoptions), 3.encode, 4.get_font_families (.get_windows_control_themes), 4.get_templates (.get_windows_control_themes), 4.get_windows_control_themes, 4.options, 5.rtweet, 6.set_font_family (.set_template), 7.set_template, 7.set_window_control_theme (.set_template), 7.start, 7.stop (.start), 7.stop_all (.start), 7.tiny, 8.uri, 9 $browse, 10 $ate, 10 $s, 3 $chromeoptions, 10 $chrome_start, 10 $chrome_stop, 10 $encode, 10 $font_family, 7 $get_font_families, 10 $get_templates, 10 $get_windows_control_themes, 10 $options, 10 $rtweet, 10 $set_font_family, 10 $set_template, 10 $set_window_control_theme, 10 $start, 10 $stop, 10 $stop_all, 10 $template, 7 $theme, 7 $tiny, 10 $uri, 2, 10 Carbon, 10, 2 5, 7 9, 9, 12 -browse (.browse), 2 -ate (.ate), 2 -chrome (.chromeoptions), 3 -encode (.encode), 4 -fields (_fields), 10 -get-fields (.get_windows_control_themes), 4 -options (.options), 5 -rtweet (.rtweet), 6 -selenium (.start), 7 -set-fields (.set_template), 7 -tinyurl (.tiny), 8 -uri (.uri), 9 _fields, 10 ate (.ate), 2 chrome, 4 gravity, 11 image_write, 6 page, 10 post_tweet, 6, 11 R6, 9 rsdriver, 3, 8 13

14 INDEX tinyurl, 12 URLencode, 4 write_clip, 8