How to Teach R: Common mistakes

by Garrett Grolemund

Would you like to teach people to use R? If so, I would like to jump-start your efforts.

I’m one half of RStudio’s education team, and I’ve taught thousands of people to use R, usually in face-to-face workshops. Over time, I’ve come to appreciate that teaching R in a short workshop is an unusual challenge that requires an unusual approach: you cannot teach a short workshop in the same way that you would teach a college course, and you should not teach R in the same way you would teach Python, UNIX or C.

In the next few blog posts, I’ll share the pedagogy that I’ve adopted for teaching R workshops. These ideas have made my life easier and my students happier (based on student feedback). I think they can do the same for you.

We’ll begin in this post by identifying common mistakes that ensnare new R teachers. Each of these mistakes seems like a good idea at first glance, but leads to an unsuccessful short workshop, and I’ll tell you why. To make things simple, I’ve recast each mistake as a principle to follow. Let’s examine them one by one:

  • DO NOT teach R as if it were a programming language. Why not? Because R is a programming language for doing data science. You can be confident that your students want to use R to make graphs, fit models, and impress their colleagues. Show them how to do these empowering things and then teach programming later, as a way to do these things even better. To be honest, if your students only wanted to learn how to program, they would be studying another language.

  • DO NOT assume that methods that work well in a college classroom will work well in a one-, two-, or half-day workshop. Active learning, peer-led instruction, group projects, flipped classrooms, and other techniques have improved college so much that I wish I could go back and do college over again. But these techniques take more time to convey information than you have in a workshop. They also work best with motivated students who are accustomed to learning. Do you have those? If your workshops are like mine, you have busy individuals who have set aside precious time and money to take your workshop. To be frank, they want to acquire more information than you can provide in a day of active learning or peer-led instruction. I’m not saying that you shouldn’t use these techniques (please try!), but expect to modify them heavily.

  • DO NOT avoid the lecture. Some teaching gurus will do somersaults to avoid lectures because lectures are too passive for students and too easy to do poorly. Some extremists even extend this notion to slides, claiming that good teachers should not use slides. If you adopt this mindset, you will fail at the one thing that your students expect you to do well: to convey large amounts of information in a short period of time. Not only should you embrace lecturing, i.e., presenting information, you should become an expert at it. Learn to present effectively, and learn to intermix presentations with activities that keep your workshop engaging.

  • DO NOT assume that you can teach someone else’s workshop out of the box, even if it is your own. A workshop is not like a video that you make once and then replay when needed. A workshop is more like a play that must be cast, costumed, and rehearsed each time you present it in a new venue. If you think you can reproduce a workshop quickly because “it already exists,” you are setting yourself up for failure. If you let your manager think this, you are setting yourself up for stress!

  • DO NOT let your workshop become a consulting clinic for installation bugs. Workshops make first impressions just like people do. You want to use the first minutes of your workshop to set an energetic tone, to engage your students, and to inspire them — not to hop from student to student debugging installation problems. Do what it takes to avoid this situation. My favorite solution is to provide a classroom RStudio Server for students to use.

    But what if you feel that students deserve to leave your workshop with the software successfully installed on their computer? Then you are in good company! My mentor, Hadley Wickham, argues for this persuasively and enthusiastically. But make it happen in a way that does not torpedo your workshop. Hold a real clinic. Pass out instructions in advance and demand that any problems be reported ahead of time. Make successful installation a prerequisite for registering. Be sure that your students know that if they do not have permission to install necessary software on their work laptop, they should bring a different laptop. Be creative and cover the bases.

    Whatever you do, remember that the hour immediately before class is less than ideal for installing software. You have other tasks to attend to, and inevitably some students will come late and bring bugs.

I’ll have more to say about each of these topics in the posts that follow. In those posts, I’ll try to layout a fun, inspiring vision for how an R workshop works; no more “thou shall nots.” See you there!

Share Comments ·