Kom igångKom igång gratis

Plotting yields over time by region

So far, you have used a function to plot yields over time for each crop, and you've added a census_region column to the crop datasets. Now you are ready to look at how the yields change over time in each region of the USA.

ggplot2 is loaded. corn and wheat have been fortified with census regions. plot_yield_vs_year() is available.

Den här övningen är en del av kursen

Introduction to Writing Functions in R

Visa kurs

Interaktiv övning med praktiskt arbete

Testa den här övningen genom att slutföra den här exempelkoden.

# Plot yield vs. year for the corn dataset
___ +
  # Facet, wrapped by census region
  ___(___(___))
Redigera och kör kod