Obtaining Separate Summary Statistics by Categorical Variable with Stargazer Package
问题 I would like to use stargazer to produce summary statistics for each category of a grouping variable. I could do it in separate tables, but I'd like it all in one – if that is not unreasonably challenging for this package. For example library(stargazer) stargazer(ToothGrowth, type = "text") #> #> ========================================= #> Statistic N Mean St. Dev. Min Max #> ----------------------------------------- #> len 60 18.813 7.649 4.200 33.900 #> dose 60 1.167 0.629 0.500 2.000 #> -