按地区绘制不同时期的产量
到目前为止,您已经使用函数绘制了各作物随时间变化的产量,并且为作物数据集添加了 census_region 列。现在,您可以查看美国各地区的产量如何随时间变化。
已加载 ggplot2。corn 和 wheat 已加入 census 区域信息。plot_yield_vs_year() 可用。
本练习是课程的一部分
R 函数编写入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Plot yield vs. year for the corn dataset
___ +
# Facet, wrapped by census region
___(___(___))