Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RGui myScript.r param1 param2
- 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();
- Args <- commandArgs(trailingOnly=TRUE)
- if(length(Args)>0 &sum(grepl("-f",commandArgs()))==0) ){
- if(grepl("(?i).r$",Args[1])){
- File <- Args[1]
- Args <- Args[-1]
- tryCatch(source(File) , error=function(e) print(e) )
- }
- }
- Rgui --args myscript.r arg1 arg2
- Rscript myscript.r arg1 arg2
- R --args myscript.r arg1 arg2
- R -f myscript.r --args arg1 arg2
- #dumb script
- print(Args)
Add Comment
Please, Sign In to add comment