R4DS additional exercises/stretch exercises


Tomorrow I’ll start to teach R4DS to a new group of 20 students ranging from total coding beginners to experienced users who just want a fresh start to solid Python users that are curious about R.

I’m looking for material/activities to keep the faster-paced students occupied so we don’t feel rushed for everyone else. I have some exercises that correspond to sections of R4DS that I’ll hopefully run across and post here. Does anyone else have something they can share?

@jessemaegan, I know you have some for the online learning community. Is there a link, or should I just retrieve them from Slack?


I didn’t ever get around to publishing any myself, although I know a few were put into the #stretch_work channel. I’ve unarchived it for you, and it will be available for the next couple of days if you want to peruse it!


Our stretch exercise for the first week (R4DS Sections 1-3.4) was to make additional figures with a new (tidy) dataset. They really got into it! Agronomists cannot resist yield data, so gave them data on grain yields of different crops in Iowa over time. Still just working in the console, so I had them copy and paste this code from NASS:

crops<-read.csv(text=getURL("https://raw.githubusercontent.com/Ranae/AGRON_R4DS/master/week_01/iowa_crop_history.csv"), header=T)