I want to pass a chunk of Python code to Python in R with something like
system('python ...'), and I'm wondering if there is an easy way to emulate the python console in this case. For example, suppose the code is
"print 'hello world'", how can I get the output like this in R?
>>> print 'hello world' hello world
This only shows the output:
> system("python -c 'print \"hello world\"'") hello world
BTW, I asked in r-help but have not got a response yet (if I do, I'll post the answer here).
© Stack Overflow or respective owner