我需要在win中从命令提示符处以交互方式启动R(以便能够显示绘图).知道我怎么能这样做吗?
谢谢.
我想知道是否可以从Windows中的命令提示符向RGui传递参数.我想做点什么
RGui myScript.r param1 param2
Run Code Online (Sandbox Code Playgroud)
就像我对RScript一样,但我需要显示一个GUI.
以下是有关我需求的更多信息.我想在我的C#表单应用程序中嵌入一个用R编写的gui.会发生什么是我按下表单中的按钮,应用程序启动一个使用我的脚本和一些参数调用RGui的进程.到目前为止,这对RScript运行良好,但现在我正在显示图形,我需要R处于交互模式.这是我正在使用的代码:
myProcess.StartInfo.FileName =Pathing.GetUNCPath( r_path) + "\\Rscript";
string script_path=Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.FullName.ToString();
myProcess.StartInfo.Arguments = Pathing.GetUNCPath(script_path) + "\\display.r " + data_path;
myProcess.StartInfo.UseShellExecute = true;
myProcess.Start();
myProcess.WaitForExit();
Run Code Online (Sandbox Code Playgroud)