<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/new-sports-from-random-emoji/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://juliasilge.com/blog/emoji-sports/"> Rstats on Julia Silge</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>I love emoji ❤️ and I love xkcd, so <a rel="nofollow" href="https://xkcd.com/1920/" target="_blank">this recent comic</a> from Randall Munroe was quite a delight for me.</p>
<div>
<img src="https://i2.wp.com/imgs.xkcd.com/comics/emoji_sports.png?w=456&ssl=1" data-recalc-dims="1">
</div>
<p>I sat there, enjoying the thought of these new sports like horse hole and multiplayer avocado and I thought, “I can make more of these in just the barest handful of lines of code”. This is largely thanks to the <a rel="nofollow" href="https://github.com/hadley/emo" target="_blank">emo</a> package by Hadley Wickham, which if you haven’t installed and started using yet, WHY NOT??? <img alt="😱" src="https://s.w.org/images/core/emoji/2.3/72x72/1f631.png" class="wp-smiley"></p>
<pre><code>emoji_sports &lt;- function(n) {
    data &lt;- dplyr::sample_n(emo::jis, n)
    emo::ji_glue(paste(dplyr::pull(data, emoji),
                       collapse = &quot;&quot;))
}</code></pre>
<p>This function uses the <code>jis</code> dataset from the emo package, sample a few of them, and then prints them out in a R Markdown document, which is what I use to blog. Let’s make some!</p>
<div>
<h2>🤵<img alt="🏼" src="https://s.w.org/images/core/emoji/2.3/72x72/1f3fc.png" class="wp-smiley">🤕<img alt="🙅" src="https://s.w.org/images/core/emoji/2.3/72x72/1f645.png" class="wp-smiley"><img alt="🏿" src="https://s.w.org/images/core/emoji/2.3/72x72/1f3ff.png" class="wp-smiley">‍♂️</h2>
<p>Excellent. This new sport is a head injury formalwear competition; it’s judged very strictly.</p>
</div>
<div>
<h2><img alt="🇸🇳" src="https://s.w.org/images/core/emoji/2.3/72x72/1f1f8-1f1f3.png" class="wp-smiley"><img alt="🙏" src="https://s.w.org/images/core/emoji/2.3/72x72/1f64f.png" class="wp-smiley"><img alt="🙍" src="https://s.w.org/images/core/emoji/2.3/72x72/1f64d.png" class="wp-smiley"><img alt="🏿" src="https://s.w.org/images/core/emoji/2.3/72x72/1f3ff.png" class="wp-smiley">‍♀️</h2>
<p>Here we see the new sport of being thankful for Senegalese culture.</p>
</div>
<div>
<h2>⭐️<img alt="🐣" src="https://s.w.org/images/core/emoji/2.3/72x72/1f423.png" class="wp-smiley"><img alt="🔪" src="https://s.w.org/images/core/emoji/2.3/72x72/1f52a.png" class="wp-smiley"></h2>
<p>This new sport is a scary one, where stars are awarded to the baby chicks with the best knife-throwing skills.</p>
<p>Some of the sports in the xkcd comic have only two characters, and we can make those as well.</p>
</div>
<div>
<h2>🤷<img alt="🏻" src="https://s.w.org/images/core/emoji/2.3/72x72/1f3fb.png" class="wp-smiley"><img alt="🏃" src="https://s.w.org/images/core/emoji/2.3/72x72/1f3c3.png" class="wp-smiley"><img alt="🏻" src="https://s.w.org/images/core/emoji/2.3/72x72/1f3fb.png" class="wp-smiley">‍♂️</h2>
<p>Ah yes, we’ll soon all be enjoying the sport of running long distances for no understandable reason. I think some of you probably <em>already</em> enjoy this sport.</p>
<p>Or we can generate lots with purrr.</p>
<pre><code>library(purrr)

map(sample(c(2,3), 10, replace = TRUE),
    emoji_sports)</code></pre>
<pre><code>## [[1]]
## 🕝️👷🏼‍♀️ 
## 
## [[2]]
## 🚕🧘🏿‍♀️🧕🏾 
## 
## [[3]]
## ⚾🤞🏾 
## 
## [[4]]
## 👂🏿🔈️🤷🏻‍♂️ 
## 
## [[5]]
## 👳🏿☃✡ 
## 
## [[6]]
## 🕸️🕟️🤚🏻 
## 
## [[7]]
## 🇧🇷🛃 
## 
## [[8]]
## 🧝🏾‍♂️🛌🏽🦅 
## 
## [[9]]
## ☂↘️✋ 
## 
## [[10]]
## 🎖️💂🏿‍♂️</code></pre>
<p>Some of those emojis aren’t printing quite as well, but there are definitely some winners (timed spiderweb fingerknitting and the like).</p>
<p>I could keep going all day, but I’ll wrap it up here. <img alt="👋" src="https://s.w.org/images/core/emoji/2.3/72x72/1f44b.png" class="wp-smiley"> Let me know if you have any questions!</p>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://juliasilge.com/blog/emoji-sports/"> Rstats on Julia Silge</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/Blecnji2aFo" height="1"></a></div>