R 如何隐藏sna::components的输出?

R 如何隐藏sna::components的输出?,r,components,sna,R,Components,Sna,我试着跑步 library(sna) g <- rgraph(100, tprob=0.1) cmp <- invisible(components(g)) 我尝试过设置选项,如选项(verbose=F),但这也不起作用 也许与此有关?我最终使用了RMarkdown。您应该能够通过以下方式抑制输出: X <- capture.output(cmp <-components(g)) X X <- capture.output(cmp <-components

我试着跑步

library(sna)
g <- rgraph(100, tprob=0.1)
cmp <- invisible(components(g))
我尝试过设置选项,如
选项(verbose=F)
,但这也不起作用


也许与此有关?我最终使用了RMarkdown。

您应该能够通过以下方式抑制输出:

X <- capture.output(cmp <-components(g))
X
X <- capture.output(cmp <-components(g))