Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从R运行PowerShell脚本_R_Powershell_Rstudio - Fatal编程技术网

从R运行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 如何运行

我想从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

如何运行此脚本?

在windows中,您可以从其中一个窗格的Rstudio访问命令提示符。我对R一无所知,但我猜
system
需要可执行文件的名称。因此它可能应该是
powershell
而不是
powershell