Hands-On Programming with R – Book recommendation

"Hands-On Programming with R" by Garrett Grolemund is a very gentle introduction to programming with R. It starts with explaining the installation and the R user interface and covers step by step more advances topics. It is is not a programming book per se, as you will learn how to use R for data science. If you want to learn R from scratch and you are a newcomer to programming, then this is the book I would like warmly to recommend!

"Hands-On Programming with R – Write your own Functions and Simulation" is a very gentle introduction to programming with R. Even if it starts very low key it broadens your skills step by step to an intermediate level. With many exercises, you will learn step by step how to use R for data science.

I will especially emphasize t the pedagogical concept of the book. It teaches you the R programming skill by way of three practical challenges which functions as an advanced organizer for the story line: All the relevant knowledge is integrated into the programming of casino games: Simulating unfair (weighted) dice, playing cards, and the design of a virtual slot machine. These tasks not only motivate but are taken from real life experiences.

Practicing with real world examples

The third case study, for instance, the slot machine example, was taken from a much-discussed scandal in the 1990s, where Video Lottery Terminals in Manitoba, Canada were believed to cheat the public. All three projects are chosen in a way not only to learn program(e.g. logical operators, if-else statements, loops) but also to understand important concepts of data science (e.g. sampling without and with replication, calculating the probability of expected events).

Hands-On Programming with R is friendly, conversational, and active. It#s the next-best thing to learning R programming from me or Garret in person. – Hadley Wickham (Chief Scientists at RStudio)

Not only for the programmer but also for the data scientist

Even if the book targets R beginners, it covers concept you will not find in other introductions. I refer here to the S3 classes, questions of speed (vectorized code) and even handling of debugging issues. "Hands-On Programming" is not only oriented to the programmer but should also especially beneficial for scientists who have used R in their daily work but just for statistical analyses and not for programming their own functions. With "Hands-On Programming" you will learn to write your first function already in chapter one!


Grolemund, G. (2014). Hands-On Programming with R: Write Your Own Functions and Simulations (1st ed.). Sebastopol, CA: O’Reilly and Associates.

Tipp: Try in google the following sequence: hands-on programming with r pdf

Von Peter Baumgartner

Seit mehr als 30 Jahren treiben mich die Themen eLearning/Blended Learning und (Hochschul)-Didaktik um. Als Universitätsprofessor hat sich dieses Interesse in 13 Bücher, knapp über 200 Artikel und 20 betreuten Dissertationen niedergeschlagen. Jetzt in der Pension beschäftige ich mich zunehmend auch mit Open Science und Data Science Education.

Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert