我在网上找到了一个代码,它必须(将)生成一个代表美国劳工部的一些数据的图形:劳工统计局:
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
这段代码缺少什么?