with(airquality,plot(Wind,Temp, main = "wind and temp in NYC"))dev.copy(png,file("mycopy.png"))dev.off()
你的代码这里file("mycopy.png")应该改成file="mycopy.png",就可以了