Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: -reshape-, or -by-?


From   "Richard Sherman" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: -reshape-, or -by-?
Date   Wed, 9 Apr 2003 11:41:25 -0400

Nick,

Wow.  A one-line command that executes in about one second.  Very nice.
Thanks!

How about:

	foreach v of varlist var1 var2 ... {
	  egen `v'_sum = sum(`v'), by(year)
	}

--Nick Winter


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index