stargazer automatically centres values within tables. How can I left align the columns?
Put this code in an .Rnw file and use knitr to
As has been pointed out in the comments, you could either post-process the output of stargazer, or use xtable. I'll demonstrate both approaches.
post-processing: Replace your code chuck with the following two code chunks
<>=
library(stargazer)
tab <- stargazer(iris[1:10,4:5], summary = FALSE)
@
<>=
collapse <- function(st) paste(st, collapse="")
st <- gsub(collapse(rep("c", 3)), collapse(rep("l",3)), tab)
cat(st[4:24])
@
xtable: After installing the xtable package, you could use this as your code chuck
<>=
library(xtable)
print(xtable(iris[1:10,4:5], align="lll", caption=""))
@
I think the xtable approach is probably easier though