Getting started with R


Back in 2017-18, I started teaching a course in a business school – instead of including a lot of theoretical frameworks, I opted to go with the basics and some implementation and tooling concepts. One of the tools that I chose to teach was how to use R in business analytics.

For those of you who do not know R, here is a helpful wiki article on the same.

Teaching what is broadly a scripting language to graduate students who havent written a single line of code is a humbling experience. You cannot take concepts such as variables, control loops, libraries as taken for granted since the exposure to these has been minimal. So how does one pack all that information into simple, usable instructions?

This is what I did.

Use free MOOCs

For students to understand the basic concepts of R – vectors, assignments, matrix, simple functions, etc, I prefer free MOOC such as the Introduction to R by Datacamp. The course is simple, it has the R ide within the practice area and allows for easy practice sessions and a playground to test your scripts while you are reading through the course material. I find this super useful for application oriented courses.

Right before jumping into the actual concepts of how R can be used for business analysis, this basic introduction course helps in establish a good solid base for participants who want to get started with R.

Use multiple datasets

I typically start these sessions with a financial data set. Credit card usage statistics, or some such information. However, I realized that students do better if they are able to relate to the date. During the length of the course, I found that switching to a course such as movie data (and thanks to IMDB for opening up their database) or cricket data made a lot more sense. It became easier for the participants to apply conceptual learning on the data sets.

See and Do

We used to incorporate several practice sessions in the class. This included getting the basics, writing scripts and getting started with R.

Some of the easier ways are –

  1. Use the R-Studio IDE installer
  2. Use the Anaconda Navigator
  3. Use an online tool like Rdrr