To address an issue in my R package, I wish to try out an svglite
graphics device for rendering ggplot
plots:
knitr::opts_chunk$set(dev = "svglite")
But, if I do so, the {pkgdown} workflow fails (failure log) with the warning messages:
1: 'mode(bg)' differs between new and previous
==> NOT changing 'bg'
2: 'mode(bg)' differs between new and previous
==> NOT changing 'bg'
If I understand correctly, these warning messages are coming from par()
, which is complaining about not being able to change the background colour (bg
). But I am not explicitly calling par()
, nor am I changing the background colour for the plot in question.
So I wish to know why exactly am I getting this error and how to resolve it?