Running R file through C# - Works with one file but not others -
i created simple code execute r file through c#. need run 3 r files, of produce .txt file. code works 1 file, not other 2. have verified files being picked up, , run expected amount of time, .txt files not being produced.
static void main() { process myprocess = new process(); try { myprocess.startinfo.filename = "c:\\program files\\r\\r-3.4.1\\bin\\rscript.exe"; //enter filepath rscript.exe myprocess.startinfo.arguments = "c:\\users\\phaas\\documents\\greaterthanexceptions.r"; //enter desired .r filepath myprocess.start(); } catch (exception ex) { throw new exception("r script failed: " + ex); } }
Comments
Post a Comment