Welcome

What’s inside every chapter
Each idea is built up from first principles in plain language, so you understand what R is doing and why.
Editable R and Python code blocks run in the browser, so you can experiment as you read, no install needed.
Step-by-step examples for every operation, from vectors and lists to data frames and functions.
Vectors, lists, matrices, arrays, strings, data frames and factors, and the operations that bring them to life.
Manipulate and reshape data the modern way, the same patterns analysts use every day.
Conditionals, loops and functions, the building blocks you need to solve real problems through code.
Browse the modules
Try it now
The same mean, computed in R and in Python, both runnable right here:
How to use this book
Read a chapter top to bottom the first time: each builds an idea from the ground up, shows it in a worked example, and lets you run the code live to see the result. Type into the editable blocks and re-run them, that is where the learning sticks. When you need a refresher, the Syllabus page is your map to every module and topic.
References
- R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. Wickham, H., & Grolemund, G. (2017). O’Reilly.
- The Art of R Programming: A Tour of Statistical Software Design. Matloff, N. (2011). No Starch Press.
- Advanced R. Wickham, H. (2019). (2nd ed.). Chapman and Hall/CRC.
- R in Action: Data Analysis and Graphics with R. Kabacoff, R. I. (2015). (2nd ed.). Manning Publications.
- Discovering Statistics Using R. Field, A., Miles, J., & Field, Z. (2012). SAGE Publications.
- An Introduction to Statistical Learning: With Applications in R. James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). Springer.
- Hands-On Programming with R. Grolemund, G. (2nd ed.). O’Reilly.
Reference Books
- R Programming for Beginners. Arora, S., & Malik, L. Universities Press.
- The R Book. Crawley, M. J. Wiley.
- Learning R. Cotton, R. O’Reilly.
- R Programming for Beginners. Rakshit, S. McGraw Hill Education.