quick.hist<-ggplot(ufo.us, aes(X=DateOccured))+geom_histogram()+scale_x_date()
ggsave(plot=quick.hist,filename= "../images/hist.png",height=6, width=8)
Run Code Online (Sandbox Code Playgroud)
文件格式很简单:
它包含2个日期,城市,州,持续时间
我在剧情期间遇到错误:那是在期间 ggsave()
Error in grDevices::png(..., width = width, height = height, res = dpi,
unable to start png() device
Run Code Online (Sandbox Code Playgroud)
另外:警告信息:
In grDevices::png(..., width = width, height = height, res = dpi,
unable to open file '../images/hist.png' for writing
In grDevices::png(..., width = width, height = height, res = dpi,
opening device failed
Run Code Online (Sandbox Code Playgroud)
我是R的新手并且收到错误.我刚刚开始复制直方图的书代码,第一章从书机学习黑客的角度出发.
r ×1