3.14 Summary
This chapter introduced the tools and programming fundamentals you will use throughout this textbook. R provides a powerful, flexible environment for data manipulation, statistical analysis, and visualization, while RStudio makes that environment accessible through a well-designed interface. Whether you access RStudio through Posit.Cloud or a local installation, the core workflow is the same: write code in scripts, execute it in the console, and inspect results in the environment and plots panels.
We covered the building blocks of R programming — variables, vectors, data frames, lists, factors, and formulas — along with the programming constructs that tie them together: functions, loops, conditional statements, and scripts. We also introduced packages, which extend R’s capabilities, and comments, which make your code readable and maintainable. These are not abstract concepts; every one of them will be used in the case study chapters that follow.
Finally, we introduced AI coding assistants — particularly Claude Code — as tools that can accelerate your R workflow. These tools are most effective when paired with a solid understanding of what your code is doing, which is exactly what this chapter has begun to build. In the next chapter, we put these skills to work: loading the Absenteeism at Work dataset, computing summary statistics, creating visualizations, and building a first model.