Hi,
I tried appending some files using the following code:
The idea is to append all files for which I have part of the file names stored in another file (all.dta). Concretely, the files I want to append all start with "analysis_ " and are then followed by the names which can be found in the file all.dta. The file analysis_ra.dta stands for the name ra which is first in the all.dta. Based on this file I wanted to append all the other files. My code only appends one single file but not all of them. Can you tell me where my problem lies?
Thank you!
I tried appending some files using the following code:
Code:
forvalues i=2/10 { use all in `i', clear levelsof Name, local (Name) use analysis_ra.dta, clear foreach n of local Name{ append using "analysis_`n'.dta" save new, replace } }
Thank you!
Comment