我想使用 R Markdown 在 HTML 文档中显示回归输出。我尝试了texreg
和stargazer
包。我现在的问题是,在笔记中我无法将重要的星星带入生活。由于自动生成,我似乎无法逃脱它们。我一直在困惑这个和这个,但没有成功。我错过了什么?非常感谢!!
这是一些代码:
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r data}
library(car)
lm1 <- lm(prestige ~ income + education, data=Duncan)
```
## with STARGAZER
```{r table1, results = "asis", message=FALSE}
library(stargazer)
stargazer(lm1, type="html", notes="stargazer html 1") # nothing
stargazer(lm1, type="html", notes="stargazer html 2", star.char = "\\*") # nothing, even gone in table
```
## with TEXREG
```{r table2, results = "asis", message=FALSE}
library(texreg)
htmlreg(lm1, custom.note="%stars. htmlreg") # nothing
htmlreg(lm1, custom.note="%stars. htmlreg", star.symbol = "\\*") # still nothing!
```
注意:问题是我现在拆分的以前的子问题。