One tool that statisticians—and now data scientists as well—often use for data cleaning, analysis, and reporting is the R programming language.
In this chapter, we'll begin by looking at the basics of using R as a programming language and as a statistical analysis tool, and we'll also install a few useful R packages that we will continue to use throughout the book.
By the end of this chapter, you will be able to:
- Install R packages for use throughout the book
- Use R as a calculator for basic arithmetic
- Utilize different data structures
- Control program flow by writing if-else, for, and while loops
- Import and export data to and from CSV, Excel, and SQL