Basically,
I managed to execute a python script within R. However, I have no idea how to return those values from the python script to R and store those values in R, especially when I have multiple functions in the python script.
What should I add to the python script to make this process possible ?
note: Suppose I pass in the arguments python test.py arg1 arg2 arg3 from R to python at the beginning.
This the test.py I have written below.
#!/usr/bin/python
import sys
jd = sys.argv
def testing(jd):
print 'Number of arguments:', len(jd), 'arguments.'
print 'Argument List:', str(jd)
return jd
def testing2():
return 123123
testing(jd)
testing2()