

{"id":5996,"date":"2017-05-23T06:56:33","date_gmt":"2017-05-23T11:56:33","guid":{"rendered":"https:\/\/rud.is\/b\/?p=5996"},"modified":"2018-03-07T17:17:20","modified_gmt":"2018-03-07T22:17:20","slug":"r%e2%81%b6-idiomatic-for-the-people","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/","title":{"rendered":"R\u2076 \u2014 Idiomatic (for the People)"},"content":{"rendered":"<p>NOTE: I&#8217;ll do my best to ensure the next post will have nothing to do with Twitter, and this post might not completely meet my R\u2076 criteria.<\/p>\n<p>A single, altruistic, nigh exuberant R tweet about slurping up a directory of CSVs devolved quickly &#8212; at least in my opinion, and partly (sadly) with my aid &#8212; into a thread that ultimately strayed from a crucial point: <em>idiomatic is in the eye of the beholder<\/em>.<\/p>\n<p>I&#8217;m not linking to the twitter thread, but there are enough folks with sufficient Klout scores on it (is Klout even still a thing?) that you can easily find it if you feel so compelled.<\/p>\n<p>I&#8217;ll take a page out of the U.S. High School &#8220;write an essay&#8221; playbook and start with a definition of <em>idiomatic<\/em>:<\/p>\n<blockquote><p>\n  <em>using, containing, or denoting expressions that are natural to a native speaker<\/em>\n<\/p><\/blockquote>\n<p>That comes from <em>idiom<\/em>:<\/p>\n<blockquote><p>\n  <em>a form of expression natural to a language, person, or group of people<\/em>\n<\/p><\/blockquote>\n<p>I usually joke with my students that a strength (and weakness) of R is that there are ~twelve ways to do any given task. While the statement is deliberately hyperbolic, the core message is accurate: there&#8217;s more than one way to do most things in R. A cascading truth is: what makes one way more &#8220;correct&#8221; over another often comes down to idiom.<\/p>\n<p>My rstudio::conf 2017 presentation included an example of my version of using <code>purrr<\/code> for idiomatic CSV\/JSON directory slurping. There are lots of ways to do this in R (the point of the post is not really to show you how to do the directory slurping and it is unlikely that I&#8217;ll approve comments with code snippets about that task). Here are three. One from base R tribe, one from the <code>data.table<\/code> tribe and one from the <code>tidyverse<\/code> tribe:<\/p>\n<pre id=\"slurp-01\"><code class=\"language-r\"># We need some files and we&#039;ll use base R to make some\r\ndir.create(&quot;readings&quot;)\r\nfor (i in 1970:2010) write.csv(mtcars, file.path(&quot;readings&quot;, sprintf(&quot;%s.csv&quot;, i)), row.names=FALSE)\r\n\r\nfils &lt;- list.files(&quot;readings&quot;, pattern = &quot;.csv$&quot;, full.names=TRUE)\r\n\r\ndo.call(rbind, lapply(fils, read.csv, stringsAsFactors=FALSE))\r\n\r\ndata.table::rbindlist(lapply(fils, data.table::fread))\r\n\r\npurrr::map_df(fils, readr::read_csv)<\/code><\/pre>\n<p>You get data for all the &#8220;years&#8221; into a <code>data.frame<\/code>, <code>data.table<\/code> and <code>tibble<\/code> (respectively) with those three &#8220;phrases&#8221;.<\/p>\n<p>However, what if you want the year as a column? Many of these &#8220;datalogger&#8221; CSV data sets do not have a temporal &#8220;grouping&#8221; variable as they let the directory structure &amp; naming conventions embed that bit of metadata. That information would be nice, though:<\/p>\n<pre id=\"slurp-02\"><code class=\"language-r\">do.call(rbind, lapply(fils, function(x) {\r\n  f &lt;- read.csv(x, stringsAsFactors=FALSE)\r\n  f$year &lt;- gsub(&quot;^readings\/|\\\\.csv$&quot;, &quot;&quot;, x)\r\n  f\r\n}))\r\n\r\ndt &lt;- data.table::rbindlist(lapply(fils, data.table::fread), idcol=&quot;year&quot;)\r\ndt[, year := gsub(&quot;^readings\/|\\\\.csv$&quot;, &quot;&quot;, fils[year])]\r\n\r\npurrr::map_df(fils, readr::read_csv, .id = &quot;year&quot;) %&gt;% \r\n  dplyr::mutate(year = stringr::str_replace_all(fils[as.numeric(year)],\r\n                                                &quot;^readings\/|\\\\.csv$&quot;, &quot;&quot;))<\/code><\/pre>\n<p>All three versions do the same thing, and each tribe understands each idiom.<\/p>\n<p>The <code>data.table<\/code> and <code>tidyverse<\/code> versions get you much faster file reading and the ability to &#8220;fill&#8221; missing columns &#8212; another common slurping task. You can hack something together in base R to do column fills (you&#8217;ll find a few StackOverflow answers that accomplish such a task) but you will likely decide to choose one of the other idioms for that and become equally as comfortable in that new idiom.<\/p>\n<p>There are multiple ways to further extend the slurping example, but that&#8217;s not the point of the post.<\/p>\n<p>Each set of snippets contains 100% valid R code. They accomplish the task and are <em>idiomatic for each tribe<\/em>. Despite what any <em>&#8220;mil gun feos turrach na latsa&#8221;<\/em> experts&#8217; exchange would try to tell you, the best idiom is the one that works for you\/you &amp; your collaborators and the one that gets you to the real work &#8212; data analysis &#8212; in the most straightforward &amp; reproducible way possible (for you).<\/p>\n<p>Idiomatic does not mean there&#8217;s only a singular One, True Way\u2122, and I think a whole host of us forget that at times.<\/p>\n<p>Write good, clean, error-free, reproducible code.<\/p>\n<p>Choose idioms that work best for you and your collaborators.<\/p>\n<p>Adapt when necessary.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: I&#8217;ll do my best to ensure the next post will have nothing to do with Twitter, and this post might not completely meet my R\u2076 criteria. A single, altruistic, nigh exuberant R tweet about slurping up a directory of CSVs devolved quickly &#8212; at least in my opinion, and partly (sadly) with my aid [&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":[810],"class_list":["post-5996","post","type-post","status-publish","format-standard","hentry","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>R\u2076 \u2014 Idiomatic (for the People) - 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\/2017\/05\/23\/r\u2076-idiomatic-for-the-people\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R\u2076 \u2014 Idiomatic (for the People) - rud.is\" \/>\n<meta property=\"og:description\" content=\"NOTE: I&#8217;ll do my best to ensure the next post will have nothing to do with Twitter, and this post might not completely meet my R\u2076 criteria. A single, altruistic, nigh exuberant R tweet about slurping up a directory of CSVs devolved quickly &#8212; at least in my opinion, and partly (sadly) with my aid [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2017\/05\/23\/r\u2076-idiomatic-for-the-people\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-23T11:56:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T22:17:20+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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"R\u2076 \u2014 Idiomatic (for the People)\",\"datePublished\":\"2017-05-23T11:56:33+00:00\",\"dateModified\":\"2018-03-07T22:17:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/\"},\"wordCount\":593,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"keywords\":[\"post\"],\"articleSection\":[\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/\",\"name\":\"R\u2076 \u2014 Idiomatic (for the People) - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2017-05-23T11:56:33+00:00\",\"dateModified\":\"2018-03-07T22:17:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2017\\\/05\\\/23\\\/r%e2%81%b6-idiomatic-for-the-people\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R\u2076 \u2014 Idiomatic (for the People)\"}]},{\"@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":"R\u2076 \u2014 Idiomatic (for the People) - 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\/2017\/05\/23\/r\u2076-idiomatic-for-the-people\/","og_locale":"en_US","og_type":"article","og_title":"R\u2076 \u2014 Idiomatic (for the People) - rud.is","og_description":"NOTE: I&#8217;ll do my best to ensure the next post will have nothing to do with Twitter, and this post might not completely meet my R\u2076 criteria. A single, altruistic, nigh exuberant R tweet about slurping up a directory of CSVs devolved quickly &#8212; at least in my opinion, and partly (sadly) with my aid [&hellip;]","og_url":"https:\/\/rud.is\/b\/2017\/05\/23\/r\u2076-idiomatic-for-the-people\/","og_site_name":"rud.is","article_published_time":"2017-05-23T11:56:33+00:00","article_modified_time":"2018-03-07T22:17:20+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"R\u2076 \u2014 Idiomatic (for the People)","datePublished":"2017-05-23T11:56:33+00:00","dateModified":"2018-03-07T22:17:20+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/"},"wordCount":593,"commentCount":10,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"keywords":["post"],"articleSection":["R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/","url":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/","name":"R\u2076 \u2014 Idiomatic (for the People) - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2017-05-23T11:56:33+00:00","dateModified":"2018-03-07T22:17:20+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2017\/05\/23\/r%e2%81%b6-idiomatic-for-the-people\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"R\u2076 \u2014 Idiomatic (for the People)"}]},{"@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-1yI","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":4027,"url":"https:\/\/rud.is\/b\/2016\/02\/28\/a-tale-of-two-charting-paradigms-vega-lite-vs-rggplot2\/","url_meta":{"origin":5996,"position":0},"title":"A Tale of Two Charting Paradigms: Vega-Lite vs R+ggplot2","author":"hrbrmstr","date":"2016-02-28","format":false,"excerpt":"This post comes hot off the heels of the [nigh-feature-complete release of `vegalite`](http:\/\/rud.is\/b\/2016\/02\/27\/create-vega-lite-specs-widgets-with-the-vegalite-package\/) (virtually all the components of Vega-Lite are now implemented and just need real-world user testing). I've had a few and seen a few questions about \"why Vega-Lite\"? I _think_ my previous post gave some good answers to\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12297,"url":"https:\/\/rud.is\/b\/2019\/06\/09\/wrapping-up-exploration-of-john-deeres-mowerplus-database\/","url_meta":{"origin":5996,"position":1},"title":"Wrapping Up Exploration of John Deere&#8217;s MowerPlus Database","author":"hrbrmstr","date":"2019-06-09","format":false,"excerpt":"I did another twitter thread on the aforeblogged MowerPlus database as I explored the tables after a second mow to determine what identified a unique mowing \"session\" (using John Deere's terms). This is the thread: As forewarned, today was the second mow with the new @JohnDeere mower. I'll thread the\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\/2019\/06\/mow-speed.png?fit=1200%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/06\/mow-speed.png?fit=1200%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/06\/mow-speed.png?fit=1200%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/06\/mow-speed.png?fit=1200%2C720&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/06\/mow-speed.png?fit=1200%2C720&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":7803,"url":"https:\/\/rud.is\/b\/2018\/01\/15\/cant-stop-at-21-twitter-recipe-22-tying-up-loose-threads\/","url_meta":{"origin":5996,"position":2},"title":"Can&#8217;t Stop at 21: Twitter Recipe #22 \u2014 Tying Up Loose Threads","author":"hrbrmstr","date":"2018-01-15","format":false,"excerpt":"NOTE: The likelihood of this recipe being added to the recent practice bookdown book is slim, but I'll try to keep the same format for the blog post. Problem You want to collect all the tweets in a Twitter tweet thread Solution Use a few key functions in rtweet to\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\/2018\/01\/Screen-Shot-2018-01-15-at-3.01.13-PM.png?fit=962%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-15-at-3.01.13-PM.png?fit=962%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-15-at-3.01.13-PM.png?fit=962%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-01-15-at-3.01.13-PM.png?fit=962%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":7733,"url":"https:\/\/rud.is\/b\/2017\/12\/30\/r%e2%81%b6-capture-tweets-with-tweet_shot\/","url_meta":{"origin":5996,"position":3},"title":"R\u2076 \u2014 Capture Tweets with tweet_shot()","author":"hrbrmstr","date":"2017-12-30","format":false,"excerpt":"(You can find all R\u2076 posts here) UPDATE 2018-01-01 --- this has been added to rtweet (GH version). A Twitter discussion: I'm going to keep my eyes out for this one! Would love to have an easy way to embed tweets in Rmd talks!\u2014 Jeff Hollister (@jhollist) December 30, 2017\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\/12\/preview.png?fit=517%2C899&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":10121,"url":"https:\/\/rud.is\/b\/2018\/04\/20\/painless-odbc-dplyr-connections-to-amazon-athena-and-apache-drill-with-r-odbc\/","url_meta":{"origin":5996,"position":4},"title":"Painless ODBC  + dplyr Connections to Amazon Athena and Apache Drill with R &#038; odbc","author":"hrbrmstr","date":"2018-04-20","format":false,"excerpt":"I spent some time this morning upgrading the JDBC driver (and changing up some supporting code to account for changes to it) for my metis package? which connects R up to Amazon Athena via RJDBC. I'm used to JDBC and have to deal with Java separately from R so I'm\u2026","rel":"","context":"In &quot;Apache Drill&quot;","block_context":{"text":"Apache Drill","link":"https:\/\/rud.is\/b\/category\/apache-drill\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/04\/today-is-a-good-day-to-query.jpg?fit=700%2C535&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":7359,"url":"https:\/\/rud.is\/b\/2017\/12\/01\/a-public-apology-to-tal-r-bloggers-the-trouble-with-tibbles\/","url_meta":{"origin":5996,"position":5},"title":"A Public Apology to Tal\/R-Bloggers + The Trouble With Tibbles","author":"hrbrmstr","date":"2017-12-01","format":false,"excerpt":"Over the past few weeks, I had been noticing that some posts in the R-bloggers feed were getting truncated in Feedly. I don't remember when I noticed that since I usually click through immediately from the headline entry to the R-bloggers page vs read in Feedly since ultimately I want\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\/5996","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=5996"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/5996\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=5996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=5996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=5996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}