how to call python script from R with arguments

后端 未结 2 1627
自闭症患者
自闭症患者 2021-02-07 05:45

I have a python script which takes some 5 arguments( a filename, 3 int values and 2 float values). I need to call this python script from R. How can I do that. I am trying to us

2条回答
  •  北海茫月
    2021-02-07 06:23

    There is a small typo in the great previous answer. The right code is the following:

     system('python test.py hello world', wait = FALSE)
    

    where wait is FALSE (not wait=Flase or wait=False)

提交回复
热议问题