Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/75.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 文件中有错误(con,“w”)_R_Powershell - Fatal编程技术网

R 文件中有错误(con,“w”)

R 文件中有错误(con,“w”),r,powershell,R,Powershell,这是Windows10上下文。R脚本(作为函数)侦听一些实时数据,然后在某个级别被触发时播放声音警报。警报由一个单独的函数调用激活,该函数仅播放一个mp3文件,我通过以下方式播放该文件 command: system("powershell.exe", input="C:/Users/ThisUser/Music/Alarms/alarm_alarm_alarm2.mp3"). 另外一个背景是,我通常在机器上运行3个(或更多)其他rstudio会话。这就是错误: Error in file(c

这是Windows10上下文。R脚本(作为函数)侦听一些实时数据,然后在某个级别被触发时播放声音警报。警报由一个单独的函数调用激活,该函数仅播放一个mp3文件,我通过以下方式播放该文件

command: system("powershell.exe", input="C:/Users/ThisUser/Music/Alarms/alarm_alarm_alarm2.mp3").
另外一个背景是,我通常在机器上运行3个(或更多)其他rstudio会话。这就是错误:

Error in file(con, "w") : cannot open the connection In addition: Warning messages:
1: package ‘httpuv’ was built under R version 3.4.1 
2: In file(con, "w") :
  cannot open file 'C:\Users\ThisUser\AppData\Local\Temp\Rtmp9w7SM3\file44982a915cf4': No such file or directory
我可以在另一个rstudio会话中从控制台测试该系统命令,它工作正常,但是如果我在错误所在会话的控制台中测试,我会继续得到错误。此外,当我检查tempdir时,我得到的是:

tempdir() [1] “C:\Users\ThisUser\AppData\Local\Temp\Rtmp9w7SM3”

我的其他会话是否弄乱了临时文件或目录路径?我该怎么修理?多谢各位