You can call the system command
system('python scriptname')
To run the script asynchronously, you can set the wait flag to false.
system('python scriptname filename 10 20 0.1 5000 30', wait=FALSE)
Arguments that are passed as on the command line. You will need to use sys.argv in python code to access the variables
#test.py import sys arg1 = sys.argv[1] arg2 = sys.argv[2] print arg1, arg2
The R command below will display "hello world"
system('python test.py hello world', wait=FALSE)
badger0053
source share