Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hadley/emo
Easily insert emoji into R and RMarkdown
https://github.com/hadley/emo
emoji r
Last synced: 7 days ago
JSON representation
Easily insert emoji into R and RMarkdown
- Host: GitHub
- URL: https://github.com/hadley/emo
- Owner: hadley
- Created: 2017-04-25T14:01:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-13T22:57:01.000Z (about 5 years ago)
- Last Synced: 2024-12-21T07:07:07.450Z (23 days ago)
- Topics: emoji, r
- Language: R
- Homepage:
- Size: 1.79 MB
- Stars: 416
- Watchers: 17
- Forks: 53
- Open Issues: 44
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - hadley/emo - Easily insert emoji into R and RMarkdown (R)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
set.seed(1014)
```# emo(ji)
The goal of emo(ji) is to make it very easy to insert emoji into RMarkdown documents.
Emoji data from .
## Installation
You can install emo from github with:
```R
# install.packages("devtools")
devtools::install_github("hadley/emo")
```## Example
You can either refer to emoji by their name (which is unique):
```{r}
emo::ji("poop")
```Or by a keyword. Keywords are not unique so emo::ji will pick one for you at random.
```{r}
emo::ji("face")
emo::ji("face")
emo::ji("face")
```Often you'll use inline like `r '\u60\u60 \u60r emo::ji("smile")\u60 \u60\u60'` `r emo::ji("smile")`
## Keywords
These are all keywords with more than one emoji associated with them.
```{r, echo = FALSE}
keywords <- emo::ji_keyword
keywords <- keywords[lengths(keywords) > 1]emojis <- purrr::map_chr(keywords, function(x) paste0(emo::ji_name[x], collapse = ""))
cat(paste(names(emojis), ": ", emojis, collapse = "\n"))
```