Emoji Search Table 😁
Quickly build a search table for emojis in R Markdown
1 min readJan 16, 2021
If it’s not clear already, I enjoy using emoji (plural) in my blog posts. I feel they’re underused on internet blogs and they can add some much needed flavor to otherwise boring text.
Here’s a search table I quickly threw together for myself using the DT package and the emo package, with some Tidyverse. Super necessary for texting. Code included below.
#devtools::install_github("hadley/emo")
library(tidyverse)
library(DT)
library(emo)b <- emo::jis %>%
select(name, emoji, group, subgroup, keywords, aliases) %>%
mutate(keywords = map(keywords, toString)) %>%
mutate(aliases = map(aliases, toString)) %>%
mutate(keywords = str_replace_all(keywords, "_", " ")) %>%
mutate(aliases = str_replace_all(aliases,"_", " "))b %>%
datatable(rownames = FALSE, extensions = 'Responsive',
caption = htmltools::tags$caption(
style = 'caption-side: top; text-align: center;',
htmltools::em('Table 1: Emoji Search Table')),
options = list(
searchHighlight = TRUE,
columnDefs = list(list(className = 'dt-center',
targets = 0:5)),
lengthMenu = c(5, 10, 15, 20)
))