

{"id":12586,"date":"2020-01-01T07:50:07","date_gmt":"2020-01-01T12:50:07","guid":{"rendered":"https:\/\/rud.is\/b\/?p=12586"},"modified":"2020-01-02T14:20:39","modified_gmt":"2020-01-02T19:20:39","slug":"writing-frictionless-r-package-wrappers-introduction","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/","title":{"rendered":"Writing Frictionless R Package Wrappers \u2014 Introduction"},"content":{"rendered":"<p>The R language and RStudio IDE are a powerful combination for &#8220;getting stuff done&#8221;, and one aspect of R itself that makes it especially useful is the ability to use it with other programming languages via a robust <em>foreign language interface<\/em> capability<sup id=\"fnref-12586-1\"><a href=\"#fn-12586-1\" class=\"jetpack-footnote\">1<\/a><\/sup>. The term &#8220;foreign language&#8221; refers to another programming language such as C, C++, Fortran, Java, Python, Rust, etc. A common way of referring the this idiom of using functionality written in another programming language from directly within R is &#8220;wrapping&#8221; since we&#8217;re putting an R &#8220;shell&#8221; around the code from the other language. Another term you may see used is &#8220;extending&#8221; (hence the title of the &#8220;Writing R Extensions&#8221; R manual).<\/p>\n<p>While R supports using this this extension mechanism from any R script leaving tiny trails of R and other language source and binary files all across your filesystem is not exactly the best way to keep these components organized and creates other challenges when you come across the need to use them in other projects or share them with others. Thankfully, the R Core team, along with many individual contributors over the years, has made it pretty straightforward to incorporate this extension capability into R packages which are much easier (honest!) to organize and share.<\/p>\n<p>The goal of this blog series &#8212; which will have a {bookdown} <a href=\"https:\/\/rud.is\/books\/writing-frictionless-r-package-wrappers\/\">book companion<\/a> along with some screencasts &#8212; is to help you get up to speed using R and RStudio to write R packages that wrap code from many different languages to help you &#8220;get stuff done&#8221; with as little friction as possible.<\/p>\n<h3>Base Requirements<\/h3>\n<p>It is assumed that readers are familiar with the R programming language, RStudio IDE, and are comfortable installing and using packages. Since this work is about extending R with other programming languages, you should also have some knowledge of one or more of the target languages being covered.<\/p>\n<p>To follow along with the series you&#8217;ll need to ensure you have the necessary components installed along the way. Rather than overwhelm you with all of them up front, each new section will introduce requirements specific to the language or situation being covered. However, there are some fundamentals you&#8217;ll need to ensure are available.<\/p>\n<ul>\n<li>An R<sup id=\"fnref-12586-2\"><a href=\"#fn-12586-2\" class=\"jetpack-footnote\">2<\/a><\/sup> environment, preferably R 3.6.x which is what was used for this series.<\/li>\n<li>RStudio<sup id=\"fnref-12586-3\"><a href=\"#fn-12586-3\" class=\"jetpack-footnote\">3<\/a><\/sup>, as we&#8217;ll be using many of the features provided in it to help reduce development friction<\/li>\n<li>The {pkgbuild}<sup id=\"fnref-12586-4\"><a href=\"#fn-12586-4\" class=\"jetpack-footnote\">4<\/a><\/sup> package installed<\/li>\n<\/ul>\n<p>Once you&#8217;ve gotten through those steps, you should fire up RStudio and run:<\/p>\n<pre><code class=\"language-r\">pkgbuild::check_build_tools(debug = TRUE)\n<\/code><\/pre>\n<p>which will help you make sure your particular system is ready to build packages.<\/p>\n<p>After performing the build tool check and\/or installation of the necessary core tools, you will then need to install the {devtools}<sup id=\"fnref-12586-5\"><a href=\"#fn-12586-5\" class=\"jetpack-footnote\">5<\/a><\/sup> package, which will help ensure that the remaining core packages required are installed.<\/p>\n<p>We&#8217;re also going to use the <code>git<\/code><sup id=\"fnref-12586-6\"><a href=\"#fn-12586-6\" class=\"jetpack-footnote\">6<\/a><\/sup> source code version control system. The <code>git<\/code> ecosystem is <em>not<\/em> &#8220;GitHub&#8221;, which is just a public (or, potentially somewhat private) place to house source code repositories, just like other hosted services such as Bitbucket, GitLab, or SourceHut. You can use the excellent &#8220;Happy Git with R&#8221;<sup id=\"fnref-12586-7\"><a href=\"#fn-12586-7\" class=\"jetpack-footnote\">7<\/a><\/sup> resource to help ensure you&#8217;re source code control environment is also ready to use.<\/p>\n<h3>Supplemental References<\/h3>\n<p>It may be helpful to create a browser bookmark folder for supplemental reference material that will be referred to from time-to-time across the sections (we&#8217;ll be adding to this list in each chapter, too):<\/p>\n<ul>\n<li>Writing R Extensions (<a href=\"https:\/\/cran.r-project.org\/doc\/manuals\/r-release\/R-exts.html\">https:\/\/cran.r-project.org\/doc\/manuals\/r-release\/R-exts.html<\/a>)<\/li>\n<li>Advanced R (<a href=\"http:\/\/adv-r.had.co.nz\/\">http:\/\/adv-r.had.co.nz\/<\/a>)<\/li>\n<li>R Packaged (<a href=\"http:\/\/r-pkgs.had.co.nz\/\">http:\/\/r-pkgs.had.co.nz\/<\/a>)<\/li>\n<\/ul>\n<h3>Up Next<\/h3>\n<p>If you&#8217;ve been a user of &#8220;development versions&#8221; of R packages or have authored R packages you likely made quick work of this first installment. Those new to creating packages with R, those who tend to only use fully-baked CRAN versions of R packages, and\/or those who have not worked with <code>git<\/code> before likely had to do quite a bit of work to get down to this point (if this describes you, you definitely deserve both a break and kudos for getting this far!).<\/p>\n<p>In the next installment we&#8217;ll make sure the package building infrastructure is ready to roll by creating a basic R package that we&#8217;ll use as a building block for future work.<\/p>\n<div class=\"footnotes\">\n<hr \/>\n<ol>\n<li id=\"fn-12586-1\">\n&#8220;Writing R Extensions&#8221;; Chapter 5, &#8220;System and foreign language interfaces&#8221;; (<a href=\"https:\/\/cran.r-project.org\/doc\/manuals\/r-release\/R-exts.html#System-and-foreign-language-interfaces\">https:\/\/cran.r-project.org\/doc\/manuals\/r-release\/R-exts.html#System-and-foreign-language-interfaces<\/a>)&#160;<a href=\"#fnref-12586-1\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-12586-2\">\nR Project Home (<a href=\"https:\/\/www.r-project.org\/\">https:\/\/www.r-project.org\/<\/a>)&#160;<a href=\"#fnref-12586-2\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-12586-3\">\nRStudio Home (<a href=\"http:\/\/rstudio.com\/\">http:\/\/rstudio.com\/<\/a>)&#160;<a href=\"#fnref-12586-3\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-12586-4\">\n{pkgbuild} CRAN page (<a href=\"https:\/\/cran.rstudio.com\/web\/packages\/pkgbuild\/\">https:\/\/cran.rstudio.com\/web\/packages\/pkgbuild\/<\/a>)&#160;<a href=\"#fnref-12586-4\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-12586-5\">\n{devtools} Home (<a href=\"https:\/\/devtools.r-lib.org\/\">https:\/\/devtools.r-lib.org\/<\/a>)&#160;<a href=\"#fnref-12586-5\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-12586-6\">\n<code>git<\/code> Home (<a href=\"https:\/\/git-scm.com\/\">https:\/\/git-scm.com\/<\/a>)&#160;<a href=\"#fnref-12586-6\">&#8617;<\/a>\n<\/li>\n<li id=\"fn-12586-7\">\nHappy Git with R (<a href=\"https:\/\/happygitwithr.com\/\">https:\/\/happygitwithr.com\/<\/a>)&#160;<a href=\"#fnref-12586-7\">&#8617;<\/a>\n<\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The R language and RStudio IDE are a powerful combination for &#8220;getting stuff done&#8221;, and one aspect of R itself that makes it especially useful is the ability to use it with other programming languages via a robust foreign language interface capability1. The term &#8220;foreign language&#8221; refers to another programming language such as C, C++, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[91],"tags":[],"class_list":["post-12586","post","type-post","status-publish","format-standard","hentry","category-r"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Writing Frictionless R Package Wrappers \u2014 Introduction - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Writing Frictionless R Package Wrappers \u2014 Introduction - rud.is\" \/>\n<meta property=\"og:description\" content=\"The R language and RStudio IDE are a powerful combination for &#8220;getting stuff done&#8221;, and one aspect of R itself that makes it especially useful is the ability to use it with other programming languages via a robust foreign language interface capability1. The term &#8220;foreign language&#8221; refers to another programming language such as C, C++, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-01T12:50:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-02T19:20:39+00:00\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Writing Frictionless R Package Wrappers \u2014 Introduction\",\"datePublished\":\"2020-01-01T12:50:07+00:00\",\"dateModified\":\"2020-01-02T19:20:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/\"},\"wordCount\":782,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"articleSection\":[\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/\",\"name\":\"Writing Frictionless R Package Wrappers \u2014 Introduction - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2020-01-01T12:50:07+00:00\",\"dateModified\":\"2020-01-02T19:20:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2020\\\/01\\\/01\\\/writing-frictionless-r-package-wrappers-introduction\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Writing Frictionless R Package Wrappers \u2014 Introduction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rud.is\\\/b\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\\\/\\\/rud.is\"],\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/author\\\/hrbrmstr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Writing Frictionless R Package Wrappers \u2014 Introduction - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/","og_locale":"en_US","og_type":"article","og_title":"Writing Frictionless R Package Wrappers \u2014 Introduction - rud.is","og_description":"The R language and RStudio IDE are a powerful combination for &#8220;getting stuff done&#8221;, and one aspect of R itself that makes it especially useful is the ability to use it with other programming languages via a robust foreign language interface capability1. The term &#8220;foreign language&#8221; refers to another programming language such as C, C++, [&hellip;]","og_url":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/","og_site_name":"rud.is","article_published_time":"2020-01-01T12:50:07+00:00","article_modified_time":"2020-01-02T19:20:39+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Writing Frictionless R Package Wrappers \u2014 Introduction","datePublished":"2020-01-01T12:50:07+00:00","dateModified":"2020-01-02T19:20:39+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/"},"wordCount":782,"commentCount":5,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"articleSection":["R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/","url":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/","name":"Writing Frictionless R Package Wrappers \u2014 Introduction - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2020-01-01T12:50:07+00:00","dateModified":"2020-01-02T19:20:39+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Writing Frictionless R Package Wrappers \u2014 Introduction"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-3h0","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":8140,"url":"https:\/\/rud.is\/b\/2018\/02\/06\/quick-and-clean-dmarc-record-processing-with-inline-rcpp\/","url_meta":{"origin":12586,"position":0},"title":"Quick and Clean DMARC Record Processing with &#8220;Inline&#8221; Rcpp","author":"hrbrmstr","date":"2018-02-06","format":false,"excerpt":"Much of what I need to do for work-work involves using tools that are (for the moment) not in R. Today, I needed to test the validity of (and other processing on) DMARC records and I'm loathe to either reinvent the wheel or reticulate bits from a fragmented programming language\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5965,"url":"https:\/\/rud.is\/b\/2017\/05\/21\/a-very-pallete-able-post\/","url_meta":{"origin":12586,"position":1},"title":"A Very Palette-able  Post","author":"hrbrmstr","date":"2017-05-21","format":false,"excerpt":"UPDATE: I was reminded that I made a more generic version of adobecolor to handle many types of swatch files which you can find on github. Many of my posts seem to begin with a link to a tweet, and this one falls into that pattern: And @_inundata is already\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/pals2-1.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/pals2-1.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/pals2-1.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/pals2-1.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/05\/pals2-1.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":12447,"url":"https:\/\/rud.is\/b\/2019\/08\/23\/polyglot-fizzbuzz-in-r-plus-why-cant-johnny-code\/","url_meta":{"origin":12586,"position":2},"title":"Polyglot FizzBuzz in R (Plus: &#8220;Why Can&#8217;t Johnny Code?&#8221;)","author":"hrbrmstr","date":"2019-08-23","format":false,"excerpt":"I caught this post on the The Surprising Number Of Programmers Who Can\u2019t Program from the Hacker News RSS feed. Said post links to another, classic post on the same subject and you should read both before continuing. Back? Great! Let's dig in. Why does hrbrmstr care about this? Offspring\u2026","rel":"","context":"In &quot;C++&quot;","block_context":{"text":"C++","link":"https:\/\/rud.is\/b\/category\/c\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10298,"url":"https:\/\/rud.is\/b\/2018\/05\/19\/create-code-metrics-with-cloc\/","url_meta":{"origin":12586,"position":3},"title":"Create Code Metrics with cloc","author":"hrbrmstr","date":"2018-05-19","format":false,"excerpt":"The cloc Perl script (yes, Perl!) by Al Danial (https:\/\/github.com\/AlDanial\/cloc) has been one of the go-to tools for generating code metrics. Given a single file, directory tree, archive, or git repo, cloc can speedily give you metrics on the count of blank lines, comment lines, and physical lines of source\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4154,"url":"https:\/\/rud.is\/b\/2016\/03\/18\/stacking-the-deck-against-treemaps\/","url_meta":{"origin":12586,"position":4},"title":"Stacking the deck against treemaps","author":"hrbrmstr","date":"2016-03-18","format":false,"excerpt":"So, I (unapologetically) did this to @Highcharts last week: @hrbrmstr Your loss of words inspired this post!! https:\/\/t.co\/3KO0BP0k0u @hadleywickham @ma_salmon @tdmv @bearloga @rushworth_a @awhstin\u2014 Highcharts (@Highcharts) March 18, 2016 They did an awesome makeover (it's interactive if you follow the link): And, I'm not kidding, it's actually a really good\u2026","rel":"","context":"In &quot;Data Visualization&quot;","block_context":{"text":"Data Visualization","link":"https:\/\/rud.is\/b\/category\/data-visualization\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":6164,"url":"https:\/\/rud.is\/b\/2017\/08\/22\/caching-httr-requests-this-means-warc\/","url_meta":{"origin":12586,"position":5},"title":"Caching httr Requests? This means WAR[C]!","author":"hrbrmstr","date":"2017-08-22","format":false,"excerpt":"I've blathered about my crawl_delay project before and am just waiting for a rainy weekend to be able to crank out a follow-up post on it. Working on that project involved sifting through thousands of Web Archive (WARC) files. While I have a nascent package on github to work with\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/12586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=12586"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/12586\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=12586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=12586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=12586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}