首页 > 解决方案 > 从 R 运行 PowerShell 脚本

问题描述

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

我怎样才能运行这个脚本?

标签: rpowershellrstudio

解决方案


推荐阅读