I believe either statement should stop warnings from appearing in the knit file, but they don't. class.warning = FALSE doesn't, either. What's the correct way to suppress warning messages for an entire .Rmd file?
It seems both statements must be included. Either one alone does nothing , but using both does suppress warnings. No idea why -- I'd think one should be enough.
I think you can suppress them in an option chunk placed just after the yaml header
```{r setup, include=FALSE}
knitr::opts_chunk$set(warning = FALSE)
```