Dear Stata listers,
After running the user community contributed command uirt, like:
I tried to tokenize the result macro e(depvar) that holds the names of dependent variables (items) separated by a space character, using:
which is not what I expect, i.e. the first (tokenized) word: v1
The help file states:
If parse() is not specified, parse(" ") is assumed, and string is split into words.
So, I assume that my line of code is technically correct (using parse(" ") also produces the whole string of words).
Nevertheless, the whole string is replicated by the first token and not the first word.
Can somebody explain what I am doing wrong here, or, if a coding alternative could produce from the stored result macro such items step by step (using a loop)?
After running the user community contributed command uirt, like:
Code:
use alike, clear qui uirt v* di "`e(depvar)'" * that results in: v1 v2 v3 v4 v5 v6 v7 v8
Code:
tokenize e(depvar), parse() dis `1' v1 v2 v3 v4 v5 v6 v7 v8
The help file states:
If parse() is not specified, parse(" ") is assumed, and string is split into words.
So, I assume that my line of code is technically correct (using parse(" ") also produces the whole string of words).
Nevertheless, the whole string is replicated by the first token and not the first word.
Can somebody explain what I am doing wrong here, or, if a coding alternative could produce from the stored result macro such items step by step (using a loop)?
Comment