How can I add emojis to a ggplot2 title. All the examples I found online only show how to use emojis as geoms or how to insert them in the axis texts. This is what I attempted but the final result is two hollow rectangles:
EDIT: I'm running Linux. My distribution is based on Ubuntu (it's Pop OS).
You need to use the Unicode codepoint for the emoji you want - for example, a smiley face is Unicode 1F600. So you can put a smiley face in a plot like so:
library(ggplot2)
library(magrittr)
mtcars %>%
ggplot(aes(x = disp, y = cyl)) +
geom_jitter() +
labs(
title = '\U1F600' # Smiley face is Unicode U+1F600
)