Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Attaching a set of local macros to a dataset
From
Amadou DIALLO <[email protected]>
To
[email protected]
Subject
Re: st: Attaching a set of local macros to a dataset
Date
Mon, 5 Nov 2012 13:34:32 +0100
Dear Marteen,
Many thanks. I am shocked I didn't think checking the extended macro
lists functions.
My first time using char command ... You saved me a lot of time and efforts.
I wish you all a good day.
Bachir.
2012/11/5, Maarten Buis <[email protected]>:
> On Mon, Nov 5, 2012 at 12:09 PM, Amadou DIALLO wrote:
>> I thought of char:
>> char _dta[one] `macro1'
>> but in the created pr file, I can't find a way to put back the
>> contents of the char into a local macro. The command:
>> loc macro1 `_dta[one]
>> is not working.
>
> *------------- begin example ---------------
> sysuse auto
> // add the characteristics
> char _dta[foo] "hello world"
>
> // save the file
> tempfile temp
> save `temp'
>
> // load the file
> use `temp'
>
> // put the characteristic in local macro bar
> local bar : char _dta[foo]
>
> // display the content of local macro bar
> di "`bar'"
> *-------------- end example ----------------
> (For more on examples I sent to the Statalist see:
> http://www.maartenbuis.nl/example_faq )
>
> Hope this helps,
> Maarten
>
>
> ---------------------------------
> Maarten L. Buis
> WZB
> Reichpietschufer 50
> 10785 Berlin
> Germany
>
> http://www.maartenbuis.nl
> ---------------------------------
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
>
--
Amadou B. DIALLO, PhD.
Senior Economist, AfDB.
[email protected]
+21671101789
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/