在构建网络中,输出的时候用dev.off无法输出图片,报错
function (which = dev.cur())
{
if (which == 1)
stop("cannot shut down device 1 (the null device)")
.External(C_devoff, as.integer(which))
dev.cur()
}
<bytecode: 0x000001a6b674cb08>
<environment: namespace:grDevices>
解决办法:
1. 改为garbage <- dev.off()
2.改成dev.off()也可以了