From | Roger Newson <[email protected]> |
To | [email protected] |
Subject | Re: st: save the value of a string variable into a macro |
Date | Thu, 15 Jul 2004 19:28:17 +0100 |
At 19:07 15/07/2004, Jean-Benoit Hardouin wrote:
In my mail, you must replace "I want to save a specific values of the variable "nomcom" into a variable, for example," by "I want to save a specific values of the variable "nomcom" into a macro, for example,"To save the value of a variable in a specific observation into a macro, use subscripting. For instance, to save the value of -nomcom- in observation 42 into a macro -mymacro-, type
JB Hardouin
Jean-Benoit Hardouin a �crit:
I have a file like that :
. list depcom nomcom in 1/5
+-----------------------------+
| depcom nomcom |
|-----------------------------|
1. | 18001 Acheres |
2. | 18002 Ainay-le-Vieil |
3. | 18003 Les Aix-d'Angillon |
4. | 18004 Allogny |
5. | 18005 Allouis |
+-----------------------------+
Where depcom is an id. I want to save a specific values of the variable "nomcom" into a variable, for example, I want to obtain :
. di "`mymacro'"
Archeres
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |