【发布时间】:2020-05-29 04:49:43
【问题描述】:
---
title: 'title'
author: "author"
output: pdf_document
---
考虑这个函数:
doSomething <- function() {
message("a message")
2
}
如果我把它放在 R Markdown 文档中:
doSomething ()
然后,PDF 中的输出将同时包含“一条消息”和从 RStudio 编织的值 2。如何在不使用suppressMessage 函数的情况下抑制“消息”?
【问题讨论】:
-
添加块选项
message=FALSE.