I would like to create a file with every combination of letters out to 10 characters.
For example, the first few lines
a
b
c
then eventually
aa
ab
ac
then eventually
aaa
aab
aac
and so on. Finally, it will end with
zzzzzzzzzz
This will create 26^10 lines. Is there a simple way to create a file like this with some kind of loop?
Thanks in advance.
Related Posts with loop to increment a string variable
Country-Industry pair correlation as a variableDear all, I am new to Statalist, and this is my first post. Thank you in advance for your support an…
How to get rid of unwanted characters based on a varying pattern?If I have the following string variable with these entries: median_age_____ median_age_group1__ med…
how to add*observations at the end of the observations for existing variables?When name and year exist, I cannot use the command below because it says variables already exist. ho…
Stepwise regression as a robustness test after an OLS?Would it be accepted to use the same variables, but switch from OLS to stepwise in Stata? Or what ot…
how to generate variables contaning distinct values of other varaibles?For example, accordging to expDomain1 to expDomain4, I want to generate var6, which includes the dis…
Subscribe to:
Post Comments (Atom)
0 Response to loop to increment a string variable
Post a Comment