

{"id":4148,"date":"2016-03-18T06:36:40","date_gmt":"2016-03-18T11:36:40","guid":{"rendered":"http:\/\/rud.is\/b\/?p=4148"},"modified":"2018-03-07T16:42:45","modified_gmt":"2018-03-07T21:42:45","slug":"hy-phen-ate-all-the-things-in-r","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/","title":{"rendered":"Hy-phen-ate All The Things! (in R)"},"content":{"rendered":"<p>`hyphenatr`&#8211;what may be my smallest package ever&#8211;has just hit [CRAN](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/). It, well, _hyphenates_ words using [`libhyphen`](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/index.html) (a.k.a. `libhnj`). There are no external dependencies (i.e. no `brew install`, `apt get`, et. al. required) and it compiles on _everything_ CRAN supports _including_ Windows.<\/p>\n<p>I started coding this to see if it could be a &#8220;poor dude&#8217;s &#8216;syllabifier'&#8221; (NOTE: _&#8221;dude&#8221;_ is gender agnostic and I am fully aware of the proper NLP terms to use but it&#8217;s way more fun to make up words) to make it easer to turn my [Zellingach project](http:\/\/rud.is\/projects\/zellingenach.html) from earlier in the year into a generalized package. In short, [Tex hyphenation rules](https:\/\/en.wikipedia.org\/wiki\/Hyphenation_algorithm) (which is what `libhyphen` and, hence, `hyphenatr` uses) don&#8217;t generalize to separating all syllables since&#8211;for instance&#8211;you really wouldn&#8217;t want to leave some trailing syllables hanging apart from their siblings (mostly for typographic reasons). Rather than let my investigation work be for naught, you get a package!<\/p>\n<p>### What&#8217;s in the box?<\/p>\n<p>`hyphenatr` ships with support for _39_ language hyphenation rules. Here&#8217;s proof:<\/p>\n<pre lang=\"rsplus\">> library(hyphenatr)\r\n\r\nlist_dicts()\r\n#>  [1] \"af_ZA\"  \"bg_BG\"  \"ca\"     \"cs_CZ\"  \"da_DK\"  \"de\"     \"de_AT\"  \"de_CH\" \r\n#>  [9] \"de_DE\"  \"el_GR\"  \"en_GB\"  \"en_US\"  \"es_ANY\" \"et_EE\"  \"fr\"     \"gl\"    \r\n#> [17] \"hr_HR\"  \"hu_HU\"  \"is\"     \"it_IT\"  \"lt\"     \"lt_LT\"  \"lv_LV\"  \"nb_NO\" \r\n#> [25] \"nl_NL\"  \"nn_NO\"  \"pl_PL\"  \"pt_BR\"  \"pt_PT\"  \"ro_RO\"  \"ru_RU\"  \"sh\"    \r\n#> [33] \"sk_SK\"  \"sl_SI\"  \"sr\"     \"sv\"     \"te_IN\"  \"uk_UA\"  \"zu_ZA\" <\/pre>\n<p>Where underscores are present, it&#8217;s `locationcode_COUNTRYCODE` otherwise it&#8217;s just the location code and you can switch which dictionary is in use with `switch_dict()`. `en_US` is default because I&#8217;m a lazy, narcissistic American. You can read about those files [here](https:\/\/github.com\/LibreOffice\/dictionaries), and I followed Dirk&#8217;s (Eddelbuettel) model in [`AsioHeaders`](https:\/\/cran.rstudio.com\/web\/packages\/AsioHeaders\/index.html), keeping all individual copyrights &#038; author credits [intact](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/COPYRIGHTS) (open source attribution is not as easy as you might think).<\/p>\n<p>By default, `hyphenatr` will stick a `=` where hyphens can be (this is the `libhyphen` default). You can change that to anything else (examples below) _or_ you can ask `hyphenatr` to just return a split vector (i.e. components of the word split at hyphenation points).<\/p>\n<p>### How does it work?<\/p>\n<p>You call `hyphenate` on a vector of words. On my demure 13&#8243; MacBook Pro it takes ~24ms to process 10,000 words. Don&#8217;t believe me? Give this a go on your own system:<\/p>\n<pre lang=\"rsplus\">library(hyphenatr)\r\nlibrary(microbenchmark)\r\n\r\ndat <- readLines(system.file(\"extdata\/top10000en.txt\", package=\"hyphenatr\"))\r\n\r\nmicrobenchmark(out1 <- hyphenate(dat))\r\n#> Unit: milliseconds\r\n#>                    expr      min       lq     mean   median       uq      max neval\r\n#>  out1 <- hyphenate(dat) 20.77134 22.16768 23.70809 23.65906 24.73395 30.21601   100\r\n<\/pre>\n<p>I extracted some of the results of that to give an idea what you get back:<\/p>\n<pre lang=\"rsplus\">out1[500:550]\r\n#>  [1] \"got\"            \"fam=ily\"        \"pol=icy\"        \"in=vestors\"     \"record\"         \"loss\"          \r\n#>  [7] \"re=ceived\"      \"April\"          \"Ex=change\"      \"code\"           \"graph=ics\"      \"agency\"        \r\n#> [13] \"in=creased\"     \"man=ager\"       \"keep\"           \"look\"           \"of=ten\"         \"de=signed\"     \r\n#> [19] \"Euro=pean\"      \"earn=ings\"      \"en=vi=ron=ment\" \"July\"           \"job\"            \"third\"         \r\n#> [25] \"wa=ter\"         \"net\"            \"banks\"          \"an=a=lysts\"     \"strong\"         \"party\"         \r\n#> [31] \"econ=omy\"       \"away\"           \"dol=lar\"        \"taken\"          \"de=vel=oped\"    \"con=tinue\"     \r\n#> [37] \"al=low\"         \"Mi=crosoft\"     \"key\"            \"ei=ther\"        \"se=cu=rity\"     \"project\"       \r\n#> [43] \"agreed\"         \"though\"         \"Ja=pan\"         \"rather\"         \"coun=tries\"     \"plant\"         \r\n#> [49] \"along\"          \"Ap=ple\"         \"ac=tion\"<\/pre>\n<p>It's a tad slower if you want separated vectors back (~30ms) but I think you'll find that mode more useful if you do plan on using the package:<\/p>\n<pre lang=\"rsplus\">microbenchmark(out2 <- hyphenate(dat, simplify=FALSE))\r\n#> Unit: milliseconds\r\n#>                                      expr      min       lq     mean   median       uq      max neval\r\n#>  out2 <- hyphenate(dat, simplify = FALSE) 26.32844 28.27894 29.26569 29.13235 29.80986 33.21204   100\r\n\r\njsonlite::toJSON(out2[530:540], pretty=TRUE)\r\n#> [\r\n#>   [\"econ\", \"omy\"],\r\n#>   [\"away\"],\r\n#>   [\"dol\", \"lar\"],\r\n#>   [\"taken\"],\r\n#>   [\"de\", \"vel\", \"oped\"],\r\n#>   [\"con\", \"tinue\"],\r\n#>   [\"al\", \"low\"],\r\n#>   [\"Mi\", \"crosoft\"],\r\n#>   [\"key\"],\r\n#>   [\"ei\", \"ther\"],\r\n#>   [\"se\", \"cu\", \"rity\"]\r\n#> ]<\/pre>\n<p>As I stated earlier, you can use whatever separator you want, but you'll pay the price as that'll take an _excruciating_ ~31ms for this word list:<\/p>\n<pre lang=\"rsplus\">microbenchmark(out3 <- hyphenate(dat, simplify=\"-\"))\r\n#> Unit: milliseconds\r\n#>                                    expr      min       lq     mean  median       uq     max neval\r\n#>  out3 <- hyphenate(dat, simplify = \"-\") 26.22136 28.04543 29.82251 30.0245 31.20909 36.4886   100\r\n\r\nout3[500:550]\r\n#>  [1] \"got\"            \"fam-ily\"        \"pol-icy\"        \"in-vestors\"     \"record\"         \"loss\"          \r\n#>  [7] \"re-ceived\"      \"April\"          \"Ex-change\"      \"code\"           \"graph-ics\"      \"agency\"        \r\n#> [13] \"in-creased\"     \"man-ager\"       \"keep\"           \"look\"           \"of-ten\"         \"de-signed\"     \r\n#> [19] \"Euro-pean\"      \"earn-ings\"      \"en-vi-ron-ment\" \"July\"           \"job\"            \"third\"         \r\n#> [25] \"wa-ter\"         \"net\"            \"banks\"          \"an-a-lysts\"     \"strong\"         \"party\"         \r\n#> [31] \"econ-omy\"       \"away\"           \"dol-lar\"        \"taken\"          \"de-vel-oped\"    \"con-tinue\"     \r\n#> [37] \"al-low\"         \"Mi-crosoft\"     \"key\"            \"ei-ther\"        \"se-cu-rity\"     \"project\"       \r\n#> [43] \"agreed\"         \"though\"         \"Ja-pan\"         \"rather\"         \"coun-tries\"     \"plant\"         \r\n#> [49] \"along\"          \"Ap-ple\"         \"ac-tion\"<\/pre>\n<p>If you're processing text for use in HTML, you could use this package to add \"[soft hyphens](https:\/\/en.wikipedia.org\/wiki\/Soft_hyphen)\" (`&shy;`) to the words, but now we're _dangerously close_ to a nigh intolerable ~40ms for 10,000 words:<\/p>\n<pre lang=\"rsplus\">microbenchmark(out4 <- hyphenate(dat, simplify=\"&shy;\"))\r\n#> Unit: milliseconds\r\n#>                                        expr      min       lq    mean   median       uq      max neval\r\n#>  out4 <- hyphenate(dat, simplify = \"&shy;\") 28.57537 29.78537 31.6346 31.31182 33.16067 37.89471   100\r\n\r\nout4[500:550]\r\n#>  [1] \"got\"                        \"fam&shy;ily\"                \"pol&shy;icy\"                \"in&shy;vestors\"            \r\n#>  [5] \"record\"                     \"loss\"                       \"re&shy;ceived\"              \"April\"                     \r\n#>  [9] \"Ex&shy;change\"              \"code\"                       \"graph&shy;ics\"              \"agency\"                    \r\n#> [13] \"in&shy;creased\"             \"man&shy;ager\"               \"keep\"                       \"look\"                      \r\n#> [17] \"of&shy;ten\"                 \"de&shy;signed\"              \"Euro&shy;pean\"              \"earn&shy;ings\"             \r\n#> [21] \"en&shy;vi&shy;ron&shy;ment\" \"July\"                       \"job\"                        \"third\"                     \r\n#> [25] \"wa&shy;ter\"                 \"net\"                        \"banks\"                      \"an&shy;a&shy;lysts\"        \r\n#> [29] \"strong\"                     \"party\"                      \"econ&shy;omy\"               \"away\"                      \r\n#> [33] \"dol&shy;lar\"                \"taken\"                      \"de&shy;vel&shy;oped\"        \"con&shy;tinue\"             \r\n#> [37] \"al&shy;low\"                 \"Mi&shy;crosoft\"             \"key\"                        \"ei&shy;ther\"               \r\n#> [41] \"se&shy;cu&shy;rity\"         \"project\"                    \"agreed\"                     \"though\"                    \r\n#> [45] \"Ja&shy;pan\"                 \"rather\"                     \"coun&shy;tries\"             \"plant\"                     \r\n#> [49] \"along\"  <\/pre>\n<p>As stated, it works with other languages:<\/p>\n<pre lang=\"rsplus\">switch_dict(\"de_DE\")\r\n\r\nhyphenate(\"kommen\")\r\n#> [1] \"kimn-men\"<\/pre>\n<p>(I had picked a different word at random [from the internet](http:\/\/www.columbia.edu\/~fdc\/utf8.html), \"t\u00e4gel\u00eech\", but it turned out to be a \"Middle High German\" words (i.e. not currently in use). I, still, equally randomly place the blame on @sooshie but thank Twitter and blog comments for pointing it out :-) <\/p>\n<p>### Moving right along<\/p>\n<p>If you hit any snags, drop an issue [on GitHub](https:\/\/github.com\/hrbrmstr\/hyphenatr). If you have any hyphenation language rules (in the supported \"LibreOffice\" format) please submit a PR (both including the file and updating `inst\\COPYRIGHTS`).<\/p>\n<p>I cannot conclude w\/o giving special thanks to Edwin de Jonge & Gergely Dar\u00f3czi for language testing.<\/p>\n<p>Well, I really can't conclude without impersonating a Dalek:<\/p>\n<pre lang=\"rsplus\">cat(toupper(hyphenate(\"Exterminate!\", simplify=\" - \")))<\/pre>\n<p>`EX - TER - MI - NATE!`<\/p>\n","protected":false},"excerpt":{"rendered":"<p>`hyphenatr`&#8211;what may be my smallest package ever&#8211;has just hit [CRAN](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/). It, well, _hyphenates_ words using [`libhyphen`](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/index.html) (a.k.a. `libhnj`). There are no external dependencies (i.e. no `brew install`, `apt get`, et. al. required) and it compiles on _everything_ CRAN supports _including_ Windows. I started coding this to see if it could be a &#8220;poor dude&#8217;s &#8216;syllabifier&#8217;&#8221; [&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-4148","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>Hy-phen-ate All The Things! (in R) - 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\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hy-phen-ate All The Things! (in R) - rud.is\" \/>\n<meta property=\"og:description\" content=\"`hyphenatr`&#8211;what may be my smallest package ever&#8211;has just hit [CRAN](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/). It, well, _hyphenates_ words using [`libhyphen`](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/index.html) (a.k.a. `libhnj`). There are no external dependencies (i.e. no `brew install`, `apt get`, et. al. required) and it compiles on _everything_ CRAN supports _including_ Windows. I started coding this to see if it could be a &#8220;poor dude&#8217;s &#8216;syllabifier&#039;&#8221; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-18T11:36:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:42:45+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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Hy-phen-ate All The Things! (in R)\",\"datePublished\":\"2016-03-18T11:36:40+00:00\",\"dateModified\":\"2018-03-07T21:42:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/\"},\"wordCount\":641,\"commentCount\":3,\"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\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/\",\"name\":\"Hy-phen-ate All The Things! (in R) - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2016-03-18T11:36:40+00:00\",\"dateModified\":\"2018-03-07T21:42:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2016\\\/03\\\/18\\\/hy-phen-ate-all-the-things-in-r\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hy-phen-ate All The Things! (in R)\"}]},{\"@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":"Hy-phen-ate All The Things! (in R) - 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\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/","og_locale":"en_US","og_type":"article","og_title":"Hy-phen-ate All The Things! (in R) - rud.is","og_description":"`hyphenatr`&#8211;what may be my smallest package ever&#8211;has just hit [CRAN](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/). It, well, _hyphenates_ words using [`libhyphen`](https:\/\/cloud.r-project.org\/web\/packages\/hyphenatr\/index.html) (a.k.a. `libhnj`). There are no external dependencies (i.e. no `brew install`, `apt get`, et. al. required) and it compiles on _everything_ CRAN supports _including_ Windows. I started coding this to see if it could be a &#8220;poor dude&#8217;s &#8216;syllabifier'&#8221; [&hellip;]","og_url":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/","og_site_name":"rud.is","article_published_time":"2016-03-18T11:36:40+00:00","article_modified_time":"2018-03-07T21:42:45+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Hy-phen-ate All The Things! (in R)","datePublished":"2016-03-18T11:36:40+00:00","dateModified":"2018-03-07T21:42:45+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/"},"wordCount":641,"commentCount":3,"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\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/","url":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/","name":"Hy-phen-ate All The Things! (in R) - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2016-03-18T11:36:40+00:00","dateModified":"2018-03-07T21:42:45+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2016\/03\/18\/hy-phen-ate-all-the-things-in-r\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Hy-phen-ate All The Things! (in R)"}]},{"@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-14U","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":12636,"url":"https:\/\/rud.is\/b\/2020\/01\/29\/monitoring-website-ssl-tls-certificate-expiration-times-with-r-openssl-pushoverr-and-dt\/","url_meta":{"origin":4148,"position":0},"title":"Monitoring Website SSL\/TLS Certificate Expiration Times with R, {openssl}, {pushoverr}, and {DT}","author":"hrbrmstr","date":"2020-01-29","format":false,"excerpt":"macOS R users who tend to work on the bleeding edge likely noticed some downtime at <mac.r-project.org> this past weekend. Part of the issue was an SSL\/TLS certificate expiration situation. Moving forward, we can monitor this with R using the super spiffy {openssl} and {pushoverr} packages whilst also generating a\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":3460,"url":"https:\/\/rud.is\/b\/2015\/06\/15\/metricsgraphics-0-8-5-is-now-on-cran\/","url_meta":{"origin":4148,"position":1},"title":"metricsgraphics 0.8.5 is now on CRAN!","author":"hrbrmstr","date":"2015-06-15","format":false,"excerpt":"I'm super-pleased to announce that the Benevolent CRAN Overlords [accepted the metricsgraphics package](http:\/\/cran.r-project.org\/web\/packages\/metricsgraphics\/index.html) into CRAN over the weekend. Now, you no longer need to rely on github\/devtools to use [MetricsGraphics.js](http:\/\/metricsgraphicsjs.org\/) charts from your R scripts. If you're not familiar with `htmlwidgets`, take a look at [the official site for them](http:\/\/www.htmlwidgets.org\/).\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":6206,"url":"https:\/\/rud.is\/b\/2017\/08\/29\/new-cran-package-announcement-splashr\/","url_meta":{"origin":4148,"position":2},"title":"New CRAN Package Announcement: splashr","author":"hrbrmstr","date":"2017-08-29","format":false,"excerpt":"I'm pleased to announce that splashr is now on CRAN. (That image was generated with splashr::render_png(url = \"https:\/\/cran.r-project.org\/web\/packages\/splashr\/\")). The package is an R interface to the Splash javascript rendering service. It works in a similar fashion to Selenium but is fear more geared to web scraping and has quite a\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\/08\/splashr.png?fit=1066%2C1108&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/08\/splashr.png?fit=1066%2C1108&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/08\/splashr.png?fit=1066%2C1108&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/08\/splashr.png?fit=1066%2C1108&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/08\/splashr.png?fit=1066%2C1108&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":12383,"url":"https:\/\/rud.is\/b\/2019\/06\/28\/quick-hit-dig-ging-into-dns-records-with-processx\/","url_meta":{"origin":4148,"position":3},"title":"Quick hit: &#8216;dig&#8217;-ging Into r-project.org DNS Records with {processx}","author":"hrbrmstr","date":"2019-06-28","format":false,"excerpt":"The r-project.org domain had some temporary technical difficulties this week (2019-29) that made reaching R-related resources problematic for a bunch of folks for a period of time. Incidents like this underscore the need for regional and network diversity when it comes to ensuring the availability of DNS services. That is,\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":12586,"url":"https:\/\/rud.is\/b\/2020\/01\/01\/writing-frictionless-r-package-wrappers-introduction\/","url_meta":{"origin":4148,"position":4},"title":"Writing Frictionless R Package Wrappers \u2014 Introduction","author":"hrbrmstr","date":"2020-01-01","format":false,"excerpt":"The R language and RStudio IDE are a powerful combination for \"getting stuff done\", 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 \"foreign language\" refers to another programming\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":12004,"url":"https:\/\/rud.is\/b\/2019\/02\/28\/drat-all-the-%f0%9f%93%a6-enabling-easier-package-discovery-and-installation-with-your-own-cran-like-repo-for-your-packages\/","url_meta":{"origin":4148,"position":5},"title":"drat All The ?! : Enabling Easier Package Discovery and Installation with Your Own CRAN-like Repo for Your Packages","author":"hrbrmstr","date":"2019-02-28","format":false,"excerpt":"I've got a work-in-progress drat-ified CRAN-like repo for (eventually) all my packages over at CINC? (\"CINC is not CRAN\" and it also sounds like \"sync\"). This is in parallel with a co-location\/migration of all my packages to SourceHut (just waiting for the sr.ht alpha API to be baked) and a\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\/4148","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=4148"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/4148\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=4148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=4148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=4148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}