在加载<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
包时使用stargazer(type = "text")
和stargazer(type = "html")
输出时,我收到一条错误消息。例如,对于MA(1)模型:
forecast
if(!require(tseries)){install.packages("tseries")}
if(!require(stargazer)){install.packages("stargazer")}
if(!require(forecast)){install.packages("forecast")}
if(!require(mise)){install.packages("mise")}
library(rmarkdown)
library(forecast)
library(mise)
temp = ts(rnorm(100, 2, 6))
MA1 = arima(temp, order = c(0,0,1))
stargazer(MA1, type = "latex")
stargazer(MA1, type = "html")
stargazer(MA1, type = "text")
产生有效的输出。但是,stargazer(MA1, type = "latex")
和stargazer(MA1, type = "html")
返回以下错误消息:
stargazer(MA1, type = "text")
即使使用 > stargazer(MA1, type = "html")
Error in column.matrix[r, i] : subscript out of bounds
> stargazer(MA1, type = "text")
Error in column.matrix[r, i] : subscript out of bounds
卸载软件包,使用detach("package:forecast", unload = TRUE)
或rm(list = ls())
清除工作区,该问题仍然存在。但是,当我完全关闭RStudio并重新打开它而不加载mise()
时,forecast
再次适用于所有类型:
stargazer