<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>emo | Thought splinters</title>
    <link>https://notes.peter-baumgartner.net/tag/emo/</link>
      <atom:link href="https://notes.peter-baumgartner.net/tag/emo/index.xml" rel="self" type="application/rss+xml" />
    <description>emo</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>CC BY-SA 4.0</copyright><lastBuildDate>Fri, 30 Jul 2021 00:00:00 +0000</lastBuildDate>
    <image>
      <url>https://notes.peter-baumgartner.net/media/icon_huab1e86cf5cbc1139acf672dc60b9d7d0_5213_512x512_fill_lanczos_center_2.png</url>
      <title>emo</title>
      <link>https://notes.peter-baumgartner.net/tag/emo/</link>
    </image>
    
    <item>
      <title>Using Emojis Revisited</title>
      <link>https://notes.peter-baumgartner.net/2021/07/30/using-emojis-revisited/</link>
      <pubDate>Fri, 30 Jul 2021 00:00:00 +0000</pubDate>
      <guid>https://notes.peter-baumgartner.net/2021/07/30/using-emojis-revisited/</guid>
      <description>
&lt;script src=&#34;https://notes.peter-baumgartner.net/2021/07/30/using-emojis-revisited/index_files/header-attrs/header-attrs.js&#34;&gt;&lt;/script&gt;


&lt;p&gt;I already &lt;a href=&#34;https://notes.peter-baumgartner.net/2021/04/19/using-emojis-in-r-and-rmarkdown/&#34;&gt;reported on my learnings&lt;/a&gt; on the &lt;a href=&#34;https://github.com/hadley/emo&#34;&gt;emo package&lt;/a&gt; in conjunction with some pull requests for &lt;a href=&#34;https://github.com/OpenIntroStat/ims-tutorials&#34;&gt;interactive tutorials&lt;/a&gt; for the OpenIntro textbook &lt;a href=&#34;https://openintro-ims.netlify.app/index.html&#34;&gt;Introduction to Modern Statistics&lt;/a&gt;. In the meanwhile, the book is — after some reorganization of its chapters — finished and published. I ordered the &lt;a href=&#34;https://smile.amazon.de/Introduction-Modern-Statistics-Mine-%C3%87etinkaya-Rundel/dp/1943450145/&#34;&gt;print version of the book via Amazon&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On August 13th, I started working through the tutorials and reading the new book and &lt;a href=&#34;https://github.com/OpenIntroStat/ims-tutorials/pulls?q=is%3Apr+author%3Apetzi53+&#34;&gt;prepared several pull requests&lt;/a&gt;. There I encountered the problem of finding a special emoji without knowing the name or keyword. Meanwhile, I solved the difficulty of finding the emoji name for 🔟. There are even several solutions.&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/mine-cetinkaya-rundel&#34; title=&#34;GitHub account of Mine Cetinkaya-Rundel&#34;&gt;Mine Cetinkaya-Rundel&lt;/a&gt; referenced the &lt;a href=&#34;emojiterra.com&#34;&gt;EmojiTerra.com&lt;/a&gt; website to me. There you can search for the symbol to get &lt;a href=&#34;https://emojiterra.com/keycap-10/&#34; title=&#34;Emoji Keycap-10 page on EmojiTerra&#34;&gt;all the details of the corresponding emoji&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;emo::ji_name&lt;/code&gt;, you will get a list of 4239 names as character strings and their corresponding value as emoji. But you have to inspect the list manually, which really is not practical. (At least I did not find a better solution programmatically.)&lt;/li&gt;
&lt;li&gt;A more practical solution is to produce a data frame with &lt;code&gt;emojis_df &amp;lt;- emo::jis&lt;/code&gt; and to inspect it via the RStudio command &lt;code&gt;View(emojis_df)&lt;/code&gt;. There you can put the emoji symbol into the search field to get the required information.&lt;/li&gt;
&lt;li&gt;You could also get the Unicode on macOS via the window for emojis and symbols (CMD-SHIFT-SPACE) with a right-click on the icon. You will get a bunch of localized information, including the Unicode.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;images/macOS-emoji-window-min.png&#34; alt=&#34;&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Screenshot of macOS window showing keycap-10 emoji&lt;/p&gt;
&lt;/div&gt;
&lt;pre class=&#34;html&#34;&gt;&lt;code&gt;🔟
Taste mit der Zahl 10
Unicode: U+1F51F, UTF-8: F0 9F 94 9F&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;summary&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;All in all, just options 1 and 3 are feasible in a practical manner. Either to call the &lt;a href=&#34;emojiterra.com&#34;&gt;EmojiTerra.com&lt;/a&gt; website or to use &lt;code&gt;View(emo::jis)&lt;/code&gt; inside RStudio.&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Using Emojis in R and R Markdown</title>
      <link>https://notes.peter-baumgartner.net/2021/04/19/using-emojis-in-r-and-rmarkdown/</link>
      <pubDate>Mon, 19 Apr 2021 00:00:00 +0000</pubDate>
      <guid>https://notes.peter-baumgartner.net/2021/04/19/using-emojis-in-r-and-rmarkdown/</guid>
      <description>
&lt;script src=&#34;https://notes.peter-baumgartner.net/2021/04/19/using-emojis-in-r-and-rmarkdown/index_files/header-attrs/header-attrs.js&#34;&gt;&lt;/script&gt;


&lt;p&gt;Recently I worked on some pull requests for &lt;a href=&#34;https://github.com/OpenIntroStat/ims-tutorials&#34;&gt;interactive tutorials&lt;/a&gt; for the OpenIntro textbook Introduction to Modern Statistics. There I came across the &lt;a href=&#34;https://github.com/hadley/emo&#34;&gt;package &lt;code&gt;emo&lt;/code&gt;&lt;/a&gt;. Its purpose is: “Easily insert emoji into &lt;svg aria-hidden=&#34;true&#34; role=&#34;img&#34; viewBox=&#34;0 0 581 512&#34; style=&#34;height:1em;width:1.13em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:steelblue;overflow:visible;position:relative;&#34;&gt;&lt;path d=&#34;M581 226.6C581 119.1 450.9 32 290.5 32S0 119.1 0 226.6C0 322.4 103.3 402 239.4 418.1V480h99.1v-61.5c24.3-2.7 47.6-7.4 69.4-13.9L448 480h112l-67.4-113.7c54.5-35.4 88.4-84.9 88.4-139.7zm-466.8 14.5c0-73.5 98.9-133 220.8-133s211.9 40.7 211.9 133c0 50.1-26.5 85-70.3 106.4-2.4-1.6-4.7-2.9-6.4-3.7-10.2-5.2-27.8-10.5-27.8-10.5s86.6-6.4 86.6-92.7-90.6-87.9-90.6-87.9h-199V361c-74.1-21.5-125.2-67.1-125.2-119.9zm225.1 38.3v-55.6c57.8 0 87.8-6.8 87.8 27.3 0 36.5-38.2 28.3-87.8 28.3zm-.9 72.5H365c10.8 0 18.9 11.7 24 19.2-16.1 1.9-33 2.8-50.6 2.9v-22.1z&#34;/&gt;&lt;/svg&gt; and RMarkdown”.&lt;/p&gt;
&lt;p&gt;I was surprised that there is a special package. I didn’t think that including emojis wouldn’t be a problem – at least on the macOS. I only have to open the window for emojis and symbols (CMD-SHIFT-SPACE) and double click on the icon to insert it into the markdown document. No big deal, so what’s the matter?&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;images/macOs-emojis-min.png&#34; alt=&#34;&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;Screenshot of macOS window showing a selection of emojis&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;After I searched online, I saw that there many questions (and &lt;a href=&#34;https://stackoverflow.com/questions/52378661/how-to-display-emojis-in-ggplot2-using-emo-package-in-r&#34;&gt;solutions&lt;/a&gt;) about this problem. There is on CRAN a special &lt;a href=&#34;https://cran.r-project.org/web/packages/emojifont/index.html&#34;&gt;package &lt;code&gt;emojifont&lt;/code&gt;&lt;/a&gt; for using emojis and &lt;a href=&#34;https://fontawesome.com/&#34;&gt;Font Awesome&lt;/a&gt; in base R and &lt;code&gt;ggplot2&lt;/code&gt; graphics and with &lt;a href=&#34;https://github.com/dill/emoGG&#34;&gt;&lt;code&gt;emoGG&lt;/code&gt;&lt;/a&gt; another one on GitHub.&lt;/p&gt;
&lt;p&gt;For me, it is still not clear what exactly the problem is. Perhaps it has to do with different operating systems? Does the Unicode not translate to all systems?&lt;/p&gt;
&lt;p&gt;Anyway, I looked into &lt;code&gt;emo,&lt;/code&gt; and it turned out that it offers some useful functions when working with strings containing emojis. You can also add emojis to summarize p-values. Additionally, I learned several things:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;p&gt;With &lt;code&gt;emojis_df &amp;lt;- emo::jis&lt;/code&gt;, you get a data frame with 3570 emoticons categorized by 21 variables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In &lt;code&gt;emojis_df&lt;/code&gt;, you will find the keywords for each emoji. But this is problematic as they are not unique. In the &lt;a href=&#34;https://github.com/hadley/emo#keywords&#34;&gt;ReadMe of &lt;code&gt;emo&lt;/code&gt; in GitHub&lt;/a&gt;, you will see a massive list of multiple references for each keyword.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you are using keywords, the command &lt;code&gt;emo::ji(&amp;lt;keyword&amp;gt;)&lt;/code&gt; will randomly pick one.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;emo::ji(&amp;quot;face&amp;quot;)
emo::ji(&amp;quot;face&amp;quot;)
emo::ji(&amp;quot;face&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## 😈
## 💆 
## 👼 &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To identify, you have to use the short name of the &lt;a href=&#34;http://cldr.unicode.org/&#34;&gt;Common Local Data Repository&lt;/a&gt; (CDLR) included in the &lt;code&gt;emojis_df&lt;/code&gt;. If you want to use emojis with a particular skin tone, you have to use the alias name as the CDLR name produces an error. Instead of looking up an emoji within the above-created data frame &lt;code&gt;emojis_df&lt;/code&gt;, I found it more practicable to search in the official &lt;a href=&#34;https://www.unicode.org/emoji/charts/emoji-list.html&#34;&gt;Unicode Emoji List&lt;/a&gt;. It has not so many different columns but focuses on icon display and CLDR short name.&lt;/p&gt;
&lt;span class=&#39;Z3988&#39; title=&#39;url_ver=Z39.88-2004&amp;amp;ctx_ver=Z39.88-2004&amp;amp;rfr_id=info%3Asid%2Fzotero.org%3A2&amp;amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;amp;rft.type=blogPost&amp;amp;rft.title=Using%20Emojis%20in%20R%20and%20R%20Markdown&amp;amp;rft.source=Thought%20splinters&amp;amp;rft.rights=CC%20BY-SA%204.0&amp;amp;rft.description=Recently%20I%20worked%20on%20some%20pull%20requests%20for%20[interactive%20tutorials](https://github.com/OpenIntroStat/ims-tutorials)%20for%20the%20%20OpenIntro%20textbook%20Introduction%20to%20Modern%20Statistics.%20There%20I%20came%20across%20the%20[package%20%60emo%60](https://github.com/hadley/emo).%20Its%20purpose%20is:%20%22Easily%20insert%20emoji%20into%20R%20and%20R%20Markdown%22.%20This%20post%20describes%20some%20learnings%20on%20how%20to%20use%20this%20package.&amp;amp;rft.identifier=https%3A%2F%2Fnotes.peter-baumgartner.net%2Fpost%2F2021%2F2021-04-19-using-emojis-in-r-and-rmarkdown.en%2Fusing-emojis-in-r-and-rmarkdown&amp;amp;rft.aufirst=Peter&amp;amp;rft.aulast=Baumgartner&amp;amp;rft.au=Peter%20Baumgartner&amp;amp;rft.date=2021-04-19&amp;amp;rft.language=en&#39;&gt;&lt;/span&gt; 
</description>
    </item>
    
  </channel>
</rss>
