ABSTRACT

The statistical programming language R is a widely used open-source software package, which is user-friendly and easy to learn. This chapter is designed for those who are unfamiliar with R and contains a tutorial on how to use it to analyse soccer-related data. Through a series of easy-to-follow tutorial examples, the reader is shown how to program in R and produce robust working code. These examples include how to: manipulate and edit data; import and export data; use ‘for’ loops and ‘if’ statements; and plot and graphically present data. Examples of statistical hypothesis testing and linear regression are also presented. The chapter also contains a guide to installing and using RStudio, which is a user-friendly integrated development environment in which to run R.