Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: format of a referenced macro


From   "Nikolaos A. Patsopoulos" <[email protected]>
To   [email protected]
Subject   Re: st: format of a referenced macro
Date   Thu, 27 Jul 2006 17:31:08 +0300

Adam Seth Litwin wrote:
Hello, all.

I am referencing a macro, but I can't figure out how to set the formatting
upon referencing.

Here's what I mean...

local M1R2 = stats[4,1]
file write filename "Here is `M1R2'."


This writes a line to a file that looks like this:
Here is .2835322214434233.

How would I get it to look like:
Here is 0.28.

I just don't know where to put the %9.2f.

Thank you for your help. adam

*
* 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/


Try:
local  M1R2 %9.2f = stats[4,1]

Nikos

*
*   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