Use custom fonts in R, e.g. with ggplot2

The showtext package can import .otf font files, that can be used with ggplot2 theme options.

library(showtext)
font.add("NameOfFont", "NameOfFont.otf")
showtext.auto() 

library(ggplot2)
ggplot(d, aes(x = x, y = y)) +
geom_point() +
theme(text = element_text(family="NameOfFont")) 

Alternativly, there is extrafont. The downside: It can only use .ttf files.