Running R in batch mode on in Windows 10 command line (bash)


fra

Joined
Apr 28, 2017
Messages
2
Reaction score
0
I am considering switching from mac to windows 10, thanks to its new command line.
However, I need to find out if one of the operations I perform for work all the time works in the new unix-like command line.
The operation is executing R scripts from the command line using the optparse to read command line arguments,

A full explanation of how this is done in a unix or mac computer is in the following link (part 3)
http://www.cureffi.org/2014/01/15/running-r-batch-mode-linux/

Is it possible to do the same in Windows 10?

Appreciate any help.
Thanks
 
Ad

Advertisements

fra

Joined
Apr 28, 2017
Messages
2
Reaction score
0
yes, I am asking if it is possible to execute R scripts that take options from the comand line just like in a linux os. The *.R files have in the first line this:
#!/usr/bin/env Rscript
and use the optparse R functionality to read arguments passed from the command line call. That works in linux. Would that work in Windows 10?
Thanks!
 
Ad

Advertisements

Data

Chief Operations Officer
Joined
Apr 13, 2017
Messages
427
Reaction score
81
Read my previous reply on how to set it up.

Once you enable bash under Windows 10 you should be able to do it*.

* It is in beta like the article I linked you do explains and you need minimum Windows 10 1607.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top