Book Image

R Programming Fundamentals

By : Kaelen Medeiros
Book Image

R Programming Fundamentals

By: Kaelen Medeiros

Overview of this book

R Programming Fundamentals, focused on R and the R ecosystem, introduces you to the tools for working with data. You’ll start by understanding how to set up R and RStudio, followed by exploring R packages, functions, data structures, control flow, and loops. Once you have grasped the basics, you’ll move on to studying data visualization and graphics. You’ll learn how to build statistical and advanced plots using the powerful ggplot2 library. In addition to this, you’ll discover data management concepts such as factoring, pivoting, aggregating, merging, and dealing with missing values. By the end of this book, you’ll have completed an entire data science project of your own for your portfolio or blog.
Table of Contents (6 chapters)

Data Management

In Chapter 2, Data Visualization and Graphics, it was mentioned that data visualization is a key part of EDA. The techniques for data management we'll discuss in this chapter constitute the other important parts of EDA, which you should always do prior to modeling and analysis. In this chapter, we will address what a factor variable is and how to use one, how to summarize your data numerically, how to combine, merge, and split datasets, and how to split and combine strings.

By the end of this chapter, you will be able to:

  • Create and reorder factor variables
  • Generate pivot tables
  • Aggregate data using the base and dplyr packages
  • Use various methods to split, apply, and combine data in R
  • Split character strings using the stringr package
  • Merge and join different datasets using base R and the dplyr methods