Dear Statalist Users,
I have multiple txt files and I want to convert them into stata files so that I can append the data.
This is the manual way of importing the data and then saving it for stata.
import delimited "C:\Dir\Manu - 00-01.txt", delimiter("|") varnames(2)
rename v1 company
rename v2 product
save manu_00-01
However, I have 20 text files in the form of Manu - 00-01.txt, Manu - 00-02.txt, Manu - 00-03.txt and so on till Manu - 18-19.txt.
I seek you suggestion on writing a loop for the same so that I can append it accordingly
Thank you
Related Posts with Writing a Loop
dual treatment effect modelI'd like to ask if there is an official command of dual treatment effect model. I use the stata17 ve…
looking for tl_2016_us_county.zip,can you share the package with me?Can any friends share this map pack(tl_2016_us_county.zip)? Just to practice the operation of the sp…
Interpreting significant intereactions inHello, I post below a results table for a diff in diff model. For simplicities sake, please look on…
Interpretation of xtreg,feDear Community, Could you please help with the interpretation of the -xtreg -fe results. Basically,…
Imputing a passive variableDear all, I have the following data. A group identifier for the region (region) a person lives in wi…
Subscribe to:
Post Comments (Atom)
0 Response to Writing a Loop
Post a Comment