Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: AW: easier way to write many matrix names


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: AW: easier way to write many matrix names
Date   Tue, 13 Jul 2010 16:41:44 +0200

<> 



This accumulation technique is the key to many insidious problems, often in
connection with -graph- commands. See it in perfection in NJC´s
http://www.stata.com/support/faqs/data/distinctstrings.html




HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Amanda Fu
Gesendet: Dienstag, 13. Juli 2010 14:46
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: AW: easier way to write many matrix names

Dear Mr. Weiss,

Thanks very much for your help! The accumulated command you provide
works perfectly. I can use this logic on other similar problems I have
encountered. This is cool!

Best wishes,
Amanda

On Tue, Jul 13, 2010 at 3:13 AM, Martin Weiss <martin.weiss1@gmx.de> wrote:
> You can certainly accumulate the command in a -local- beforehand:
>
> *************
> ma drop _all
> forv i=1/29{
>        loc name `name'A`i'\
> }
> loc name `name'A30
> di in r "`name'"
> *************
> HTH
> Martin

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


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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index