I am trying to write a loop to dynamically open files in stata. I want to open two files, the first one is named forex_US.csv and the second one is named firex_US.csv .
clear all set varabbrev off set scheme s1mono
However, the code above does not seem to recognize the `i' .
What am I doing wrong?
clear all set varabbrev off set scheme s1mono
Code:
cd "D:\Test\" global data "data_folder" ************** * Load data * ************** local mylist forex firex foreach i of local mylist { import delimited "${data}\`i'_US.csv", stringcols(1 2) clear
However, the code above does not seem to recognize the `i' .
What am I doing wrong?
Comment