Statalist The Stata Listserver


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

st: RE: reshape wide command without specifying all variables?


From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: reshape wide command without specifying all variables?
Date   Tue, 18 Apr 2006 17:10:57 +0100

There are various ways to abbreviate lists of variables, which are
described in -help varlist-.

You can store a simple list of variables in a local macro, e.g.

local myvarlist var1 var2 var3
summ `myvarlist'

Or you can unabbreviate a varlist and store the full list in a local
macro with -unab-, e.g.

unab myvarlist : var1-var3
summ `myvarlist'
 
You do not need -syntax-, this is for use within programs.

Hope this helps

David

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Amber Katz
Sent: 18 April 2006 17:00
To: statalist
Subject: st: reshape wide command without specifying all variables?

Hi,

I'm trying to reshape my data, but have a very large number of variables
which are not necessarily in the same form.  Is there some way I can
execute this command without typing out all the variable names?

Also, is there a way I can put a list of variable names into some sort
of "namelist" variable which I can use later?  (i.e. I would just type
"reshape wide <namelist>)  I know that there's some "syntax" command but
don't understand how to use it here.

Thanks,
Amber

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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