Closed hturner closed 2 weeks ago
In fact, R codes perform the same in both document expect some commands related to rendering LaTeX itself. And this is controlled by knitr when kniting R Markdown file.
For example, in system.file("examples", "sweave_article", package = "texor")
, I used a setup code chunk to disable warning messages:
<<setup,include=FALSE>>=
knitr::opts_chunk$set(warning = FALSE)
@
If I delete this code chunk, it may throw warnings in both output ( pdf from Sweave and HTML from R Markdown).
I believe that Sweave does not show messages and warnings in the code output, but these will appear in the R markdown output.
A particular case is the messages that appear when a package is loaded, which we rarely want to see in the output.
I think we can set the following in the settings chunk, to always suppress package startup messages: