I have a source file (in knitr) containing plots which use a particular font family. I'd like to suppress the warning messages
In grid.Call(L_textBounds, as.graphicsAnnot(x$label), ... : font family not found in Windows font database
library(ggplot2)
ggplot(mtcars, aes(mpg, cyl, label = gear)) +
geom_text(family = "helvet")
I know I can suppress all warning messages in a script options(warn = -1)
, and I know how to use suppressWarnings
. I can also surround a particular chunk in a tryCatch
.
Is there a way to suppress only the grid.Call
warning above throughout a file?