Chapter 1 Introduction

Learning Objectives

After completing this chapter, you will be able to:

  • Install R, RStudio, and necessary helper packages
  • Use R as a fancy calculator for basic arithmetic
  • Navigate the built-in R help system to learn about functions
  • Create and assign values to objects and manage them in RStudio
  • Create and knit R Markdown documents to HTML, PDF, and Word
  • Use code chunks with appropriate chunk options to control output
  • Format text with headers, emphasis, lists, links, and equations
  • Add simple tables to your reports

Welcome! In this book you will learn the essentials of the R language and the tidyverse workflow through a series of short, hands-on chapters, from zero to pro. To begin, we’ll make sure your toolkit is ready by installing R, RStudio, and a few helper packages. Next, you will discover how R doubles as a fancy calculator, try out the built-in help system, and learn how to write clear, reproducible code.

The opening chapter closes with your first truly R-native skill: creating and assigning objects. By the end you will know how to store results, name them sensibly, and reuse them in later computations—an idea that returns throughout the book.

At a glance – Chapter ROADMAP

Section 1.1. Installation: Get R and RStudio running on your computer.
Section 1.2. R as a Calculator: Perform basic arithmetic, explore built-in functions, and query the help files.
Section 1.3. Object Assignment: Save your work as named objects and manage them inside RStudio.
Section 1.4. Getting Started: Learn the structure and knit to multiple formats.
Section 1.5. Formatting: Master Markdown syntax for headers, lists, links, and equations.
Section 1.6. Dynamic Content: Control how code and output appear in your final report.

Each subsequent chapter builds on this foundation. Chapter 2 introduces basic atomic vectors, Chapter 3 covers advanced vector operations, and Chapter 4 dives into other object types including matrices, data frames, tibbles and lists. Later chapters tackle visualization, data wrangling, and programming patterns.

Feel free to read linearly or jump straight to the topic you need; every section is written so that examples run independently once you have completed the installation step.

Happy coding!


Buy Me A Coffee