When passing a character vector to the dep.var.labels
argument to stargazer
, I expected the dependent variable labels to consist of this vector. But this only seems to happen when the models are of different types.
data(mtcars)
m0 <- lm(mpg ~ hp, data=mtcars)
m1 <- lm(mpg ~ wt, data=mtcars)
m2 <- glm(cyl ~ disp, data=mtcars)
## Only shows the label 'foo' for both models.
stargazer(m0, m1, dep.var.labels=c('foo','bar'))
## shows 'foo' and 'bar' as labels.
stargazer(m0, m2, dep.var.labels=c('foo','bar'))
How can I get stargazer to show different dependent variable labels even when the models are of the same type?