I wish to add git to my PATH in Windows 7, through the \"shell\" command in R.
shell(\'set PATH=%PATH%;\"C:\\\\Program%20Files%20(x86)\\\\Git\\\\bin\"\', intern
When you run shell
, a new process is created. In Windows, this will run CMD.EXE
and pass the arguments given. Then this process exits.
When you modify the environment variable, you are modifying in a subprocess of R and not in the R process itself. When the subprocess dies, so does its environment.
You should set the path appropriately before you start R instead.