ABSTRACT

R is a powerful programming language for any form of analytics and contains an extensive functionality to support both elementary and advanced statistical modeling. Many of the walkthrough examples in this book use R as the primary analysis tool. In this chapter, fundamental aspects of R programming are introduced to provide a foundation for the methods introduced in later chapters. The chapter progressively covers the installation and use of R, data and data types, data structures, loading, cleaning and managing data in dataframes, using functions and packages, plotting and graphing methods and documenting work using R Markdown. The chapter serves as a basic programming foundation for the remainder of the book, and as an elementary introduction to R for those new to the language.