Hi all,
I have a series of txt file stored in a folder.
I would love to do the following (ideally via loop):
1-Open each file
2-Create a variable with same name as the file title (so it will identify the file)
3-Stored all the files in dta within the folder.
Finally, I would love to append all dta file so to have a one single dataset.
Many thanks for any advice you might have!
Related Posts with Loop opening txt file and create a variable
select the first or the last groupDear all, How can I write code more efficiently to select the first group or the last group membersh…
Add vertical reference lines in horizontal barsI am using -graph hbar- to create horizontal bars on means by groups. Does anyone know how to add ve…
how to reshape?Dear All, How can I reshape the following data into a standard long format panel data? Code: // htt…
How to plot vertical densities for each variable?Hello! Do you know how I can graph estimated densities vertically on the same graph? Something of th…
insufficient observations r(2001) issueHello, I am trying to run a regression using a panel data, using something like: "xtreg wages i.hig…
Subscribe to:
Post Comments (Atom)
0 Response to Loop opening txt file and create a variable
Post a Comment