Slides and exercise from my second R intro seminar

This week I held the second introductory seminar on R, and I think it went pretty well — though I guess you really should ask my colleagues if you want to know. The first seminar was a lecture, and this seminar was a tutorial where we made some plots and calculated a few of the usual statistics. Of course the only real way to learn R is to play with it, but I hope this couple of hours provided a decent opening to getting started with R.

I actually think RStudio made it quite a bit easier. One important thing that I certainly should’ve stressed more, though, is organising code into scripts. I mentioned it in the first seminar, but I should have included it into the exercise. Maybe the first section should be something like ”Start a new script file for your analysis: Select File > New > R script to open the editor area. Save the script as unicorn_analysis.R, and for the rest of the tutorial, write your code in that window.”

Files from the seminar:

Slides about common statistical functions in R (again, ugly walls of text meant more as notes for future reference than actual slides)

Exercises for the tutorial and the associated dataset

My suggested solutions to the exercises

2 reaktioner på ”Slides and exercise from my second R intro seminar

  1. I find also that R Studio makes things a lot easier for learners. I would also like to get people using script files, but maybe the first section is too early. However, maybe after that is too late. What do you think, based on your experience?

    • My experience on this is still pretty scant, but I hope to get to more opportunities to teach R and tweak my approach 🙂

      But I don’t think it’s ever to late. Most people I know who use R interactively already keep a ”cheat sheet” or a ”code file”, and it only takes a little more effort to turn that into a running script. Right now, I think we probably could’ve used a whole session on organising code in a non-scary way. Probably after introducing interactive R. I definitely think it should be mentioned at the outset though, since it’s actually one of the big perks of doing data analysis in a programming language.

Kommentarer är stängda.