简体   繁体   English

使用library()函数加载tidyverse时关闭详细消息

[英]Turn off verbose messages when loading tidyverse using library() function

How does one turn off the many lines of messages when loading tidyverse in R? 在R中加载tidyverse时如何关闭多行消息? It doesn't respect the quietly parameter (eg, library(tidyverse, quietly = TRUE) ). 它不尊重library(tidyverse, quietly = TRUE)参数(例如, library(tidyverse, quietly = TRUE) )。 Sometimes I might want to see all of the packages it attaches and conflicts, but most of the time I can do without it or would like a less obnoxious report. 有时我可能想看到它所附带的所有软件包和冲突,但大多数时候我可以不用它或者想要一个不那么令人讨厌的报告。 Any hints on how to do this? 关于如何做到这一点的任何提示?

I'm using tidyverse 1.2.1 under R 3.4.3 on macOS 10.12.6, but am guessing this is same behavior on other systems. 我在macOS 10.12.6上使用R 3.4.3下的tidyverse 1.2.1,但我猜这在其他系统上是相同的行为。

suppressPackageStartupMessages(library(tidyverse))

An alternative to suppressPackageStartupMessages is to set options(tidyverse.quiet = TRUE) , which you can include in your .Rprofile. suppressPackageStartupMessages的替代方法是设置options(tidyverse.quiet = TRUE) ,您可以将其包含在.Rprofile中。

Source: https://www.tidyverse.org/articles/2017/11/tidyverse_1.2.0/ 资料来源: https//www.tidyverse.org/articles/2017/11/tidyverse_1.2.0/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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