knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" ) set.seed(1014)
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/.
You can install emo from github with:
# install.packages("devtools") devtools::install_github("hadley/emo")
You can either refer to emoji by their name (which is unique):
emo::ji("poop")
Or by a keyword. Keywords are not unique so emo::ji will pick one for you at random.
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")
These are all keywords with more than one emoji associated with them.
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.