Three possible solutions. One of them uses reporttools and xtable , using tidyverse tools along with stargazer , and the third base-r .
Firstly,
I want to offer you a look at reporttools , which is a kind of stargazer , but I think you should take a look at it,
# install.packages("reporttools")
in latex you get this good result, 
Secondly,
using tidyverse tools along with stargazer , inspired by this SO answer ,
# install.packages(c("tidyverse"), dependencies = TRUE) library(dplyr); library(purrr) #> ToothGrowth %>% split(. $supp) %>% walk(~ stargazer(., type = "text")) #> ========================================= #> Statistic N Mean St. Dev. Min Max #> ----------------------------------------- #> len 30 20.663 6.606 8.200 30.900 #> dose 30 1.167 0.634 0.500 2.000 #> ----------------------------------------- #> ========================================= #> Statistic N Mean St. Dev. Min Max #> ----------------------------------------- #> len 30 16.963 8.266 4.200 33.900 #> dose 30 1.167 0.634 0.500 2.000 #> ----------------------------------------- #>
Thirdly,
exclusive base-r
by(ToothGrowth, ToothGrowth$supp, stargazer, type = 'text')
source share