Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: reshaping with many variables

From   "Rio, Martin" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: reshaping with many variables
Date   Fri, 17 Oct 2003 17:26:52 -0400


Your question seems to be how to shortcut a variable list. There are two
wildcards that I use: * and ?. ? proxies for 1 character and * for many. So
Q?00 would include Q100, Q200, QK00, etc but not QAB00. On the other hand
Q*00 would include any variable that starts with a Q and ends with 00. From
your example it would seem that an appropriate shortcut could be: Q?0?_? A
shortcut like Q* would also work, but I always like to be as restrictive as
possible so that other variables don't get included in by mistake (e.g. if
you had a variable called Quarter, it would be included in Q*)

I hope this answers your question.


-----Original Message-----
From: SURAN, LUCIANA [mailto:[email protected]]
Sent: Friday, October 17, 2003 5:16 PM
To: '[email protected]'
Subject: st: reshaping with many variables

I have a question about reshaping.  I am working on a dataset containing
numerous variables, and I would like to reshape it to long form.  However,
my data set has hundreds of variables and I would like to avoid typing all
the names out.

For example, my variables look like:

Does anyone know of a shortcut?

Thank you very much,
 Luciana Suran

*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index