Switch from Sweave to Rmd
I used the captioner package to automatically label the figures. By taking out all the references to Sweave/setSweave graphics.off, etc...I'd probably recommend devoting a vignette to what all those different options are. For instance, what is the benifit of using setPage vs. not doing anything (in RStudio). That vignette could include help with troubleshooting the eternal font question.