Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/65.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
grDevices::dev.new()第一次不起作用_R_Plot - Fatal编程技术网

grDevices::dev.new()第一次不起作用

grDevices::dev.new()第一次不起作用,r,plot,R,Plot,我的问题:如何让grDevices::dev.new()正常工作 为避免plot.new()中的错误错误:图边距过大沿着小的绘图区域, 我在plot()前面写了代码grDevices::dev.new()。 但是,此代码在第一次(或按下按钮后)不起作用。。清除所有绘图按钮) 这会导致错误(例如,在R CMD检查中) 我是否误解了函数grDevices::dev.new() 参考号 回答 使用grDevices::windows()而不是grDevices::dev.new(),我克服了这些

我的问题:如何让
grDevices::dev.new()
正常工作

为避免plot.new()中的错误
错误:图边距过大
沿着小的绘图区域, 我在
plot()
前面写了代码
grDevices::dev.new()
。 但是,此代码在第一次(或按下按钮后)不起作用。
。清除所有绘图
按钮)

这会导致错误(例如,在R CMD检查中)

我是否误解了函数
grDevices::dev.new()

参考号


回答

使用
grDevices::windows()
而不是
grDevices::dev.new()
,我克服了这些问题


不幸的是,我们无法使用
grDevices::windows()
,因为
R CMD检查中出现以下错误:

  Error in grDevices::windows() : 
     screen devices should not be used in examples etc