在 R 中创建 PDF 时 plot.new() 出错
Error in plot.new() when creating PDF in R
在 R 中绘制树状图时,我遇到了一个以前从未见过的有趣错误。
Error in plot.new() :
cannot open file 'C:\Users\Sun\AppData\Local\Temp\RtmpKSRNuD\pdf12207aa37548', reason No such file or directory
我昨天在绘制其他树状图并将其保存为 PDF 文件时没有出现该错误。知道这是什么意思吗?
Plot() error when using REngine.Rserve 上的相关回答建议发送一个 dev.close()
调用作为 "not closing the device correctly last time" 的解决方法(特别是在 Rserve 下)。
Cannot open file '', reason No such file or directory 的相关回答建议使用 file.path
作为 paste
的替代方法来创建具有 platform-independent 路径分隔符的文件名。
我在 graphics.off()
上运气更好。不同的是dev.close()
关闭当前设备,graphics.off()
关闭所有打开的设备。就我而言,我正在从 Rserve 会话调用的 knitr Rmd 中编写 PDF,因此我可能有多个打开的设备。
我还发现有一个名为 (null).1001.1001
的 mysterious folder(它在 Ubuntu 框上,以 uid 1001、gid 1001 登录)。此文件夹的存在似乎对我的情况有所帮助。
在 R 中绘制树状图时,我遇到了一个以前从未见过的有趣错误。
Error in plot.new() :
cannot open file 'C:\Users\Sun\AppData\Local\Temp\RtmpKSRNuD\pdf12207aa37548', reason No such file or directory
我昨天在绘制其他树状图并将其保存为 PDF 文件时没有出现该错误。知道这是什么意思吗?
Plot() error when using REngine.Rserve 上的相关回答建议发送一个 dev.close()
调用作为 "not closing the device correctly last time" 的解决方法(特别是在 Rserve 下)。
Cannot open file '', reason No such file or directory 的相关回答建议使用 file.path
作为 paste
的替代方法来创建具有 platform-independent 路径分隔符的文件名。
我在 graphics.off()
上运气更好。不同的是dev.close()
关闭当前设备,graphics.off()
关闭所有打开的设备。就我而言,我正在从 Rserve 会话调用的 knitr Rmd 中编写 PDF,因此我可能有多个打开的设备。
我还发现有一个名为 (null).1001.1001
的 mysterious folder(它在 Ubuntu 框上,以 uid 1001、gid 1001 登录)。此文件夹的存在似乎对我的情况有所帮助。