Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Append within a loop
From
Camila Mendes <[email protected]>
To
[email protected]
Subject
st: Append within a loop
Date
Thu, 12 Jul 2012 16:39:28 -0700
Hi all,
I've created some data in separate folders using a loop, and now I wish to
append all the files (over i, k and l).
Can anyone help me?
foreach i in Female Male{
foreach k in 11 12 13 14 15 16 17 21 22 23 24 25 26 27 28 29 31 32 33 35 41
42 43 50 51 52 {
foreach l in 0a3 4a8 9a11 12+ {
use "$directory\UF `k'\variavel ocupacao\Grupo `l'\data_`i'_`k'_`l'.dta",
clear
}
}
}
Thanks,
Camila
*
* 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/