我正在使用stargazer在乳胶中提取一些回归表。我想知道它是否存在一种方法来一次性标记变量,而不必每次都通过“ covariate.labels = ... ”重新定义它。我尝试了库expss(和Hmisc),例如:
library(expss)
library(stargazer)
df <- data.frame(replicate(2,sample(0:1,100,rep=TRUE)))
df = apply_labels(df,
X1 = "label x1",
X2 = " label x2")
ols <- lm(formula = X1 ~ X2,
data= df)
stargazer(ols,
# covariate.labels = NULL,
title = "Regression Results",
label = "tab:test",
out="test.tex")
没有成功...有什么建议吗?