Hi!

I'm trying to add a "total" row to a data frame such that it corresponds to the sum of all my groups' observations (similar issue to https://www.statalist.org/forums/for...sting-variable).
I would like to use the method that is shown in this already solved topic, but for now I don't see how using either tabdisp or tag will help me to generate this new total row.

In short, considering this code :

sysuse auto, clear
collapse(sum) price, by(foreign)

How do I add a third row that shows "total" for the foreign variable and the sum of the two figures above for the price variable ?

Many thanks !
Baptiste