I am using R but having to run a complicated Stata file and trying to automate the process. So I wanted to use either shell/system or system2 in r to open CMD and open stata and