R for Programmes

By George Ross Ihaka
2026

Description

The aim of The Book R For Programmes is to provide a relatively gentle yet informative exposure to the statistical software environment R, alongside some common statistical analyses, so that readers may have a solid foundation from which to eventually become experts in their own right. Learning to use and program in a computing language is much the same as learning a new spoken language. At the beginning, it is often difficult and may even be daunting but total immersion in and active use of the language is the best and most effective way to become fluent. Many beginner-style texts that focus on R can generally be allocated to one of two categories: those concerned with computational aspects (that is, syntax and general programming tools) and those with statistical modeling and analysis in mind, often one particular type. In my experience, these texts are extremely well written and contain a wealth of useful information but better suit those individuals wanting to pursue fairly specific goals from the outset. This text seeks to combine the best of both worlds, by first focusing on only an appreciation and understanding of the language and its style and subsequently using these skills to fully introduce, conduct, and interpret some common statistical practices. The target audience is, quite simply, anyone who wants to gain a foothold in R as a first computing language, perhaps with the ultimate goal of completing their own statistical analyses. The book covers various aspects of R, from basic syntax to advanced techniques like machine learning and creating functions and simulations. This book is a good choice for beginners and those looking to delve into advanced analytics and graphics using R. This book offers a comprehensive introduction to programming and statistics using R, suitable for a first course, focuses on practical skills, teaching you how to write your own functions and perform simulations in R. The book deals with the heart of the R language and its fundamental concepts, including data organization, import and export, various manipulations, documentation, plots, programming and maintenance. The R programming language has become the de facto programming language for data science. Its flexibility, power, sophistication, and expressiveness have made it an invaluable tool for data scientists around the world. This book is about the fundamentals of R programming. You will get started with the basics of the language, learn how to manipulate datasets, how to write functions, and how to debug and optimize code. With the fundamentals provided in this book, you will have a solid foundation on which to build your data science toolbox. R For Programmes can be used purely as a programming text to learn the language or as an introductory statistical methods book with accompanying instruction in R. Though it is not intended to represent an exhaustive dictionary of the language, the aim is to provide readers with a co

About Author

George Ross Ihaka is an associate professor of statistics at the University of Auckland. In 2008, Ihaka received the Pickering Medal, awarded by the Royal Society of New Zealand, for his work on R. Ihaka completed his undergraduate education at the University of Auckland, and obtained his PhD in 1985 from the University of California. His thesis was on statistical modelling for seismic interferometry and was titled Rūaumoko, after the god of earthquakes, volcanoes and seasons in Maori mythology. He is working on a new statistical programming language based on Lisp. He is a member of the Weka project, New Zealand's other famous open-source data science contribution, and here talks about the design and development of Weka and more recent projects.

Table of Content

Preface
Chapter 1. Introduction to R
Chapter 2. Data Types and Variables
Chapter 3. Control Structures
Chapter 4. Functions in R
Chapter 5. Data Input and Output
Chapter 6. Data Structures and Manipulation
Chapter 7. Data Cleaning and Preprocessing
Chapter 8. Data Visualization in R
Chapter 9. Working with Tidyverse
Bibliography