Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Neil Shephard <nshephard@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Transforming data - horizontal to vertical |
Date | Wed, 11 May 2011 16:06:44 +0100 |
On Wed, May 11, 2011 at 4:02 PM, lreine ycenna <lreine.ycenna@gmail.com> wrote: > Hello, > This is the error message I've been getting:' invalid name > r(198); > > Also the number '2' appeared after I entered this command ' foreach > var of local countries { ' > > > ds year, not > . local countries 'r(varlist)' > > . foreach var of local countries { > 2. rename 'var' country'var' > 3. } > ' invalid name > r(198); You should be using ` and not ' to delimit macros. ` is on the button to the left of q on a traditional US/UK QWERTY keyboard ' is two keys to the right of the 'L' on a traditional US/UK QWERTY keyboard. You'd probably benefit from reading Chapter 18 of the manuals on programming. Neil -- “Truth in science can be defined as the working hypothesis best suited to open the way to the next better one.” - Konrad Lorenz Email - nshephard@gmail.com Website - http://kimura.no-ip.org/ Photos - http://www.flickr.com/photos/slackline/ * * 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/