Run R script from Powershell
-
In old DOS script, I can run an R script with the following syntax: Rterm.exe --quiet --slave --vanilla < "C:\some_script.R" However, Powershell seems to have reserved "<" for future expansion. I am wondering if there is a direct way to run R script within another powershell script. Thanks
-
Answer:
You should probably look Rscript instead of redirection -- this would become Rscript.exe C:\someScript.R where you can add the usual options.
defoo at Stack Overflow Visit the source
Other answers
Easiest way is probably to wrap it in a call to cmd.exe: cmd.exe /C "Rterm.exe --quiet --slave --vanilla < `"C:\some_script.R`""
James Kolpack
Related Q & A:
- How to convert Oracle script to MySQL script?Best solution by Stack Overflow
- How To Delete Folder with Powershell?Best solution by Stack Overflow
- What is the difference between DVD-R and DVD+R?Best solution by Yahoo! Answers
- What's the difference between DVD-R and DVD+R disks?Best solution by Yahoo! Answers
- What is the difference between DVD-R and DVD+R as well as CD-R and CD+R?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.