简体   繁体   English

编织到pdf时如何阻止rmarkdown生成“附加包”

[英]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.我最近在一些家庭作业的格式上失去了很多分数。

  1. I would like to know if there is a way of getting rid of the "attaching" packages output when knitting to .pdf?我想知道在编织到 .pdf 时是否有办法摆脱“附加”包输出?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM