Code:
use data, clear
foreach i in 1 5 6 17 18 {
% do something with the i's
}
Essentially I would like to programmatically do the same thing. Here is how I believe the ingredients in Stata should look like, but I have failed to properly finalize it:
Code:
import delim using "text.txt", delim(" ")
local `steps' transform data to local variable
use data, clear
foreach i in `steps' {
% do something with the i's
}
0 Response to Read list of numbers from txt to use in a macro
Post a Comment