[英]How to stop rmarkdown from generating the "attaching packages" when knitting to pdf
I use rmarkdown for my intro to data science class.我使用 rmarkdown 来介绍数据科学课程。 I recently lost a lot of points for formatting on a few homework assignments.
我最近在一些家庭作业的格式上失去了很多分数。
I have attached an image of the output and some formatting issues to this post.我在这篇文章中附上了输出图像和一些格式问题。
Either in code:要么在代码中:
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
or in Rmarkdown format:或 Rmarkdown 格式:
#+ echo = FALSE, warning = FALSE, message = FALSE
Look it up in Yihui's book , it's a good exercise.在易慧的书上查了一下,很好的练习。 You can also try to silence R itself:
您也可以尝试使 R 本身静音:
debug.code <- FALSE # try TRUE to see the difference
options(warn = ifelse(debug.code, 1, -1), verbose = debug.code)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.