我在网上找到了一个代码,必须(将)产生表示来自美国劳工部门的一些数据图形:劳工统计局:GGPLOT2错误:对象“比”未找到
library(ggplot2)
df <- as.data.frame(read.csv("unemp.csv", colClasses = c("Date", "numeric")))
p <- ggplot(df,aes(x=date,y=ratio))
p + geom_point() + geom_smooth() + xlab("Year") +
ylab("Civilian Employment Population Ratio (%)") +
labs(title="Bureau of Labor Statistics Series EMRATIO
(seasonally adjusted) to 2012-10-01")
但它不工作,并产生此错误:
Don't know how to automatically pick scale for object of type function. Defaulting to continuous
Error in eval(expr, envir, enclos) : object 'ratio' not found
此代码缺少什么?
'unemp.csv'包含来自here的数据,生成的图形必须看起来像this。
阿图拉,非常感谢! – Iurie