A First Course In Statistics
2020-02-16
Chapter 1 Prerequisites
Welcome to this introductory course in statistics with R! This book will help you get started and will guide you through the material of the course.
The material of this course is based on the moxier package. It consists of a series of learnr notebooks, (Schloerke, Allaire, and Borges 2019), that will guide through your first steps into the wonderful world of statistics and statistical computing!
This package was developed and is currently maintained by the MOXstat Laboratory, part of the MOX Laboratory. The MOX Laboratory is the laboratory for modelling and scientific computing of the Department of Mathematics at Politecnico di Milano.
1.1 Getting started
Whilst we will dedicate Chapter 2 to the topic of software installation, we here introduce the main tools we will use throughout this course: R and RStudio.
1.1.1 R
So, what do we talk about when we talk about R? According to the R project website, R is a software environment that includes:
- an effective data handling and storage facility,
- a suite of operators for calculations on arrays, in particular matrices,
- a large, coherent, integrated collection of intermediate tools for data analysis,
- graphical facilities for data analysis and display either on-screen or on hardcopy, and
- a well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.
Quite a number of things! We will use this set of tools to dive deep into the principles of statistics and statistical computation.
Another thing that is worth noticing is that R is Free Software. It means anybody can contribute to its development. Common tools have emerged to solve problems. R can be extended with such tools, which are called packages in R parlance, to do all sort of incredible things. Packages are usually stored on CRAN, the Comprehensive R Archive Network, and they range from packages to send emails to machine learning.
1.1.2 RStudio
RStudio is an R IDE (Integrated Development Environment). But what does it mean? Basically, it is a set of software that helps you be more productive: it allows you to quickly manage files, see what variables you have defined and a vast number of other things. This book and the moxier package have been developed from within RStudio. We will see in a minute how to install it!
1.2 Some useful links
If you are interesting in learning more about R as a programming language, you can find many resources on the Internet. Some nice books are Hands-On Programming with R, (Grolemund 2014) to get started and Advanced R (Wickham 2019) to dive deep into the features of the language.
1.3 Licence
The moxier package is subject to the GPL-3 licence. For more information, visit https://mascaretti.github.io/moxier/.
This book is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
References
Grolemund, Garrett. 2014. Hands-on Programming with R. O’Reilly. https://rstudio-education.github.io/hopr/.
Schloerke, Barret, JJ Allaire, and Barbara Borges. 2019. Learnr: Interactive Tutorials for R. https://CRAN.R-project.org/package=learnr.
Wickham, Hadley. 2019. Advance R. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. https://adv-r.hadley.nz/.