Hello!
I have 12 files from years from 2006 to 2017 and I have one code that I want to run in all of them. I thought the following works:
foreach n in seq(), from=2006 to=2017 {
display "'n'"
use "C:\Users\Admin\Documents\'n'.dta"
*main code
}
But it doesn't work. I am a beginner in STATA, please, could you say how to do it in a proper way?
Thank you in advance for your help!
0 Response to Manipulating with many files
Post a Comment