System Command with Space in R

后端 未结 1 1051
温柔的废话
温柔的废话 2020-12-20 04:53

I run a system command with spaces in directory name as followed:

command=paste(shQuote(\"java -jar C:/DIR A/DF.jar -t\"), t1, t2)

I tried

相关标签:
1条回答
  • 2020-12-20 05:42

    Here is the solution

    command=paste('java -jar "C:/DIR A/DF.jar" -t', t1, t2)
    

    use " only for the dir name and the outside with '

    0 讨论(0)
提交回复
热议问题