When stargazer is passed a data.table object, it produces beautiful summary statistic tables, organized with each variable as one row, and each statistic as a column.
Statistic N Mean SD
Var1 10 25 2
Var2 15 35 4
Is there a way to get the output so that each column is a different subset of the data.table, and each variable takes three rows: one for N, mean, and SD?
Stat Subset 1 Subset 2
Var1:N 5 15
Var1:mean 15 17
Var1:SD 12 35
Var2:N 13 14
Var2:Mean 10 2
Var2:SD 3 1