如何抑制计算过程信息,只保留计算结果在R markdown HTML?

How to suppress calculation process infomation and only keep calculation result in R markdown HTML?

---
title: "Untitled"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

```{r,message=FALSE}
library(mirt)
set.seed(12345)
a <- matrix(abs(rnorm(15,1,.3)), ncol=1)
d <- matrix(rnorm(15,0,.7),ncol=1)
itemtype <- rep('2PL', nrow(a))
N <- 1000
dataset1 <- simdata(a, d, N, itemtype)
dataset2 <- simdata(a, d, N, itemtype, mu = .1, sigma = matrix(1.5))
dat <- rbind(dataset1, dataset2)
group <- c(rep('D1', N), rep('D2', N))
models <- 'F1 = 1-15'

mod_configural <- multipleGroup(dat, models, group = group)

coef(mod_configural )
```

运行 在 Rmd 脚本和 knit to HTML 上面,我将得到计算结果输出:

## $D1
## $Item_1
##        a1     d g u
## par 1.071 0.524 0 1
## 
## $Item_2
##        a1      d g u
## par 1.217 -0.699 0 1

问题是计算过程也在HTML中输出,如:

## 
Iteration: 1, Log-Lik: -18088.494, Max-Change: 0.37763
Iteration: 2, Log-Lik: -17943.205, Max-Change: 0.18868

那我的HTML会变得很长,很难read.I试过用message=FALSE但是不行
如何抑制或折叠HTML中的那些信息?

解决方法很简单,与RMD无关。

mod_configural <- multipleGroup(dat, models, group = group, verbose = FALSE)

当你查看包的 manual (p. 95) 时,verbose 选项是解决方案。