Last week, I held a short workshop teaching #RStats to Economics students without prior programming experience.
Here are 6 lessons I learnt that I wish I had known in advance.
1⃣ Do less.
An ambitious curriculum is usually my thing. But I did not anticipate how much time it would take to get students back on track.
Without any programming experience, students will get stuck in unexpected places. Plan to do less and you will feel less pressured.
2⃣ Teach through typing
I thought letting students literally type along was silly.
Well, I thought wrong. Having typed a code snippet themselves seemed to make students have a better feeling for the code. Later on during exercises, they were better at adjusting the code.
3⃣ Start with ggplot
Some say vector manipulation should be the first thing to teach.
I didn't and this was one of the few things I wouldn't change.
My non-statistically inclined students seemed to find visual results more engaging than number/vector crunshing.
Why not easier base plots then? I find ggplot's defaults more visually pleasing.
Is ggplot too hard? With help, students got a hang of it.
Then, number crunshing can be motivated visually. Why extract specifc rows? To add another geom_point layer to highlight selected points.
4⃣ Stress to save variables before using them
Make sure that students understand that calculations can only be used later if they are saved into a variable.
But this variable-saving line has to be executed first for the actual saving to take happen.
5⃣ Teach named functions
$, [ and ] all have their rightful place in R.
Of course, using easy to remember function names is easier to learn. But remember: Do less.
I tried to show students multiple ways to get a job done using e.g. $ or pull. Go with the easier approach.
6⃣ Use pipes
Nesting functions or saving variables felt foreign to students. So, two step processes like selecting and filtering were hard. Here, pipes helped.
Though I've had math students complain that pipes feel wrong, for the Economics students it was just the right thing.
So, this was what I learned.
Even though I felt the workshop remained below my own standards, the students seemed happy to learn some programming.
I will likely write a longer account of my lessons learned on my blog. If you want to be here when that happens, follow @rappa753
• • •
Missing some Tweet in this thread? You can try to
force a refresh