A similar question was asked previously at:
How do I suppress this output?
However, that question is only applicable to Rmarkdown code blocks. In the following case I've created a script with only the following:
library(UsingR)
I've saved the file this time as an Rscript named test.R
. However, I am using the Compile Notebook icon to compile to an html document. The resulting output is as shown:
In the previous question on the link given above, the answer was:
```{r message=FALSE}
library(UsingR)
```
which will only work in an Rmarkdown code block.
How do I suppress messages of functions more generally, for example the output of the library()
function?