Teaching the Tidyverse to non-Tidyverse R Users

Split from the thread: 2019 rstudio::conf Train-the-trainer post-workshop thread


Hi there.

Thanks to Greg and Garrett (and Kate!) for their input on the course. I really appreciated the course and taking time to think carefully about teaching itself as well as the tidyverse aspects.

I have a challenge. I need to give some training to my colleagues who are already familiar with base R, who learned R maybe 5-10 years ago and who haven’t “converted” to the tidyverse yet. While the tidyverse has clear arguments around scalability, ease of constructing workflow, etc it’s a challenge to “convert” if you are well versed in base R and trying on the “new” concepts may cause you to be LESS productive and/or uncomfortable at least in the short term.

Does anyone have experience with teaching this kind of group? Tips?

Cheers,
Mike

1 Like

I tried to "convert" people to the tidyverse for a while, but it never really worked, I imagine because the folks in my lab didn't enjoy being told that they way they were doing things was wrong. And it turns out, the way they were doing things wasn't "wrong", but there were certain parts of what they did that made life difficult for everyone else (me mostly), namely that their code was unreadable and most importantly, all the Excel users they were trying to convince that R was great were scared away by their details-heavy non-tidyverse instruction.

It took me about a year to fix those two problems, and we now teach tidyverse to new master's students (even though the veterans' code is far from pure tidyverse). My new tactic is to do cool things and wait for them to ask. ggplot2 was a very easy sell...RMarkdown is what I'm pushing next but that involves switching workflow, and that has been harder. GitHub went over like a lead balloon, but I've started forcing people to use it if they want me to write code for them (because it saves so much time for me).

Hope that helps!

1 Like

I just used (a modified version of) the Master the Tidyverse instructor materials to demo a workshop I'm teaching next week at the local Geoscience Society conference, and thought I'd share some of the comments from the test participants, in the off chance they're useful.

I'm teaching to a crowd of mostly beginners that are 4th year geology/environmental science students, and I only have 4 hours, so I opted to do the Data Visualization and Data Transformation modules. Because I wanted to be able to direct folks to the really good materials that already exist, I switched out the mpg dataset for a geology-specific one (I included the extra dataset in an R package that I pre-installed in an RStudio Cloud project). Modifying the slides took a very long time (6 ish hours), and the jury is out on whether or not it was worth it. My test cohort of 6 geoscience students had some really helpful feedback:

  • RStudio Cloud was a huge hit. No installation problems, and no explanation about having to install a github package to get the geology-specific dataset.
  • Having the exercises pre-loaded in an R Notebook was really easy, and nobody had trouble figuring out how to run R code
  • The structures of both lessons are very effective, and the slides are really helpful (and very pretty).
  • The babynames dataset was a huge hit. There was a lot of exploration of the dataset outside of the "Your Turn" bits...people looking up their cat's name, etc.

Also a few constructive critisisms from the test group:

  • The beeping on the timers was very unpopular ("I feel like a failure when the timer starts beeping and I don't have it yet"). Turning the volume off seemed to fix that problem.
  • The beginner crowd needed hints to get through some of the examples. I haven't decided whether it's best to add the hints as animations on the "Your Turn" slides or add prompting text on the exercises Rmd?
  • Perhaps it was because I didn't use the mpg dataset, but the participants found the ggplot2 cheatsheet "geometries" section hard to use. I'm thinking of making a modified version but I'm not sure if a modifiable file exists?
  • Taking a trip to the back of the room to make sure everybody has the Your Turns completed is easy to forget to do but is super important. The red/green post-it-note method probably could have worked but 4 hours might be too short for folks to get used to it?

I'm planning to send a link to the four RStudio Cloud primers that correspond to the lessons we did in about a week (just like Garret did for us advertising this thread).

4 Likes

@paleolimbot thanks for sharing how things went! This sort of feedback is the best way to make courses better—and no one can collect enough by themselves (Take note, everyone!).

I wish I stressed this more in the workshop you should always circulate the room during student exercises and have your TA do it too. There are some good reasons:

  • students who need help will quietly stop you to ask a question when you are nearby (especially if you tell them that you will be walking around to help them while they work)
  • you get a chance to see if you are moving too fast, or if you need to re-explain something. If two students ask the same question (or someone points out a mistake in your exercise :upside_down_face:) you can go over it with the class afterwards
  • You can help students debug tech issues during Your Turns for students without disrupting the whole class. This makes a big difference if you are shorthanded or having students use locally installed software.
  • You look much more engaged; students think of the class as a collaboration instead of a lecture

@MikeKSmith I wish I had better advice to share, but my experience is heavily filtered by selection bias (I advertise a workshop on the Tidyverse and only have to teach students who decide it is for them—not a bad way to solve your problem if you can manage it :wink: ).

That said, resistance to new methods usually comes up at some point during the workshop (often with purrr). When it does, I stress that if someone already knows how to do something their own way, they don't have to change. New methods require an investment up front to learn, but return an advantage over the long run if used often enough. It's up to the student to decide whether or not the investment will pay off given their particular user case. I just ask students to try out the new methods for the duration of the class so that they can learn enough about the advantages to decide whether they would pay off in their case. (If I had to work with their code in the future, I might try to be more persuasive; but that would have more to do with my self-interest than theirs).

1 Like

@garrett's answer is spot-on. Speaking from my own experiences, I led a research project where some of my collaborators (more senior faculty members) learned R long (LONG) ago and were perfectly happy using base R (ahem, and not using an IDE, and copying and pasting R code from the terminal into word docs...).

So I would first make sure you are clear on why you have been asked to give some training- what do they hope to get out of it? In my experience, there are 3 main reasons people might want to learn the tidyverse even if they are perfectly functional with base R:

  1. They know base R but often feel like some things could or should be easier to do in R (and they may have heard that yes this is true if you convert to the tidyverse). This is great, and gives you a good opportunity to figure out common pain points ahead of time. For my group, ggplot2 addressed the most common pain, and gives the best instant gratification too. Also, less of a feeling of decreased productivity in the short-term.

  2. They want to collaborate with others who are tidyverse users. This was especially true for my group, as all the students who wrote the main code learned the tidyverse and the faculty could not read their code! In this case, it was less about converting and more about being bilingual, and also more about teaching project-oriented workflows, code readability/style, and R Markdown as a tool for communicating code + narrative. Also, ask to see some code beforehand! You might see folks struggling with things that they have just gotten used to (the old frog in the pot of boiling water analogy), but that you can offer help with (file paths, anyone?).

  3. They want to take advantage of the tidyverse ecosystem- there may be some specific packages they want to use, but they feel like they need to learn a whole new language to do that. First, showing them that they can mix and match can be useful (you don't have to learn all of the tidyverse to use it). I trained a group at my university who wanted to transition from Tableau/Excel to R but they told me they didn't know where to start to learn the tidyverse. We sat down and talked, and I found out that their real pain point was reshaping data from wide to long for plotting. So I started with tidyr (then moved into ggplot2 and dplyr) and they were blown away. Finding out where people note their own inefficiencies or feelings of "R helplessness" can be a great starting point.

So my general advice is try to do some focus grouping up front to make it easier for you and the learners to succeed :+1:

2 Likes

Hi @paleolimbot -- awesome feedback. I recently had some luck converting Stata users because their dynamic documents are so clunky, and I was able to demo a ton of .Rmd templates from the rticles, rmdformats, hrbrthemes, and pinp packages.

This took a little setting up beforehand, but after clicking 'knit' about 5 times, they were convinced.

Disclaimer: I did teach everyone regular markdown first (a sort of language agnostic reprex lesson for StackOverflow), so .Rmd wasn't much of a leap.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.