从R运行PowerShell脚本
我想从R studio运行PowerShell脚本,但它不适合我。我试图补充这一点:从R运行PowerShell脚本,r,powershell,rstudio,R,Powershell,Rstudio,我想从R studio运行PowerShell脚本,但它不适合我。我试图补充这一点: system("power shell -command "") 但是脚本被破坏了(““”) 这是我要运行的脚本: (Get-Content "C:\Users\XXXX\AXXXX\Local\GoogleXXXX\000022.log" -Raw)-replace '[^ -~\t]' | Set-Content XXXX.txt -Force 如何运行
system("power shell -command "")
但是脚本被破坏了(““”)
这是我要运行的脚本:
(Get-Content "C:\Users\XXXX\AXXXX\Local\GoogleXXXX\000022.log" -Raw)-replace '[^ -~\t]' | Set-Content XXXX.txt -Force
如何运行此脚本?在windows中,您可以从其中一个窗格的Rstudio访问命令提示符。我对R一无所知,但我猜
system
需要可执行文件的名称。因此它可能应该是powershell
而不是powershell
。