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)

Splitting, Combining, Merging, and Joining Datasets

Any time you're working with data, which R is designed for, you're likely to encounter a number of situations where you'll need to either split up datasets, combine them, or merge/join them. Occasionally in your work, you may be handed data that is already in one dataset that you'll use throughout the analysis. However, it's more likely that you'll need to do a decent amount of splitting, combining, and merging/joining over the course of any given project.

Splitting and Combining Data and Datasets

Splitting and unsplitting data is provided for in the base package of R with functions named split() and unsplit(). Combining data is usually done...