I'm using RStudio to knit my R markdown document into a word file.
I have this chunk in the beginning of my document:
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warnings=FALSE, messages=FALSE, results="hide")
```
But, I still keep have these messages inside my document after an histogram:
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 686 rows containing non-finite values (stat_bin).
How can I make them go away?
For this particular message, you can make it disappear by specifying the binwidth
argument to geom_histogram
. This is good practise, so you should do it!
In general, you can suppress messages by setting message = FALSE
as a chunk option.
The option to suppress this is now
, warning = F
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With