My knitr configuration
Put the code in the box at the top of your .Rmd file to use.
(No space here)```{r, message = FALSE, tidy = FALSE, echo = F}
## knitr configuration: http://yihui.name/knitr/options#chunk_options
opts_chunk$set(comment = "", error= TRUE, warning = FALSE, message = FALSE,
tidy = FALSE, cache = F, echo = T,
fig.width = 5, fig.height = 5)
## R configuration
options(width = 116, scipen = 5)
(No space here)```
knitr options explained
- comment = “”: No preceeding in the output.
- error = TRUE: Errors will be shown in the output
- warning = FALSE: No warnings will not be shown in the output.
- message = FALSE: No message will not be shown in the output.
- tidy = FALSE: Codes will be shown as they are, including spaces. No reformating will be done.
- cache = F: No caching. Caching can speeds up repeated knitting.
- echo = T: Codes will be shown in the output
- fig.width = 5: Figures will be 5-inch wide.
- fig.height = 5: Figures will be 5-inch high.
R options explained
- width = 116: The width of the output in characters.
- scipen = 5: Penalty for scientific notation such as 1e5 for 100000.