Stack Overflow: Can't use font awesome in R aka 'extra step to get fontawesome 4.7 to work', my previous blog post from January 9, 2022 about 4.7 won't work without it
- Discovered Apr 3, 2022. 17:20 SO:Can’t use font awesome in R aka how to get fontawesome 4.7 to work<– From this SO question, I had to use
load.fontawesome()
to get my previous blog post to work: Use fontawesome to display awesome characters for Firefox support tags (antivirus, operating system, certificates, addons, etc) but currently the R fontawesome package only supports fontawesome 4.7 even though the current version is version 5 and 6 is in beta
The working R Code
library(ggplot2)
library(emojifont)
load.fontawesome()
## Generate some data
DF <- data.frame(x=1:5, y=1:5)
ggplot(DF, aes(x=x, y=y)) +
geom_text(label=fontawesome(c('fa-check-circle', 'fa-linux', 'fa-meetup', 'fa-github', 'fa-eur')),
family='fontawesome-webfont',
size=seq(6, 14, 2))