--- Kushan Thakkar wrote:
> When I am using r-class results (such as r(max) ) is there a
> way to store this value into a constant variable and then use
> that variable instead ?
You can store a number either in a local macro or in a scalar.
The difference is that numbers are stored more precisely in
scalars. Storing a constant in a variable is bad style: it
wastes a lot of memory.
*--------- begin example ------------
sysuse auto, clear
sum mpg
local max = r(max)
di `max'
tempname scmax
scalar `scmax' = r(max)
di `scmax'
*-------- end example ---------------
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/