# requires latex2exp package be installed
if (requireNamespace("latex2exp", quietly = TRUE)) {
library(ggplot2)
d <- data.frame(x = 1, y = 1, facet = "$\\beta$")
ggplot(d, aes(x, y)) +
geom_point() +
facet_wrap(~ facet, labeller = label_tex)
}
Run the code above in your browser using DataLab