From | David Kantor <[email protected]> |
To | [email protected] |
Subject | Re: st: tokenize `varlist' error? |
Date | Fri, 23 Apr 2004 12:25:00 -0400 |
At 11:15 AM 4/23/2004 -0400, Adrian Gonzales wrote:
Dear StatalistersThe first version of varlist contains actual variable names, so -tokenize- works fine. The second is an abbreviated list; it does not literally contain all the variables you want, plus it has a hyphen, which is not legal in variable names.
I want to perform a simple procedure over 100 variables and I don t want to enter the name of each variable one by one.
If I use the first definition of varlist (below), my little procedure works fine. But if I used the second definition of varlist, using - I get an error (procedure below).
How can I solve this problem? I am sure this is very simple for most of you, but I am new trying to do these things with Stata.
[...]
local varlist p26_1_1 p26_1_2 p26_1_3
local varlist p26_1_1-p26_1_3
tokenize `varlist'
[...]
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |