-
Notifications
You must be signed in to change notification settings - Fork 53
/
README.Rmd
60 lines (41 loc) · 1.17 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{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 <https://github.com/muan/emojilib/>.
## 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"))
```