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)

ggplot2

ggplot2 is an incredibly popular graphics package in R. It can be installed on its own or comes as part of the Tidyverse set of packages.

Developed by Hadley Wickham and Winston Chang, ggplot2 implements the Grammar of Graphics, a pre-existing idea in statistical computing, for R. As we begin making plots with ggplot2, you may recognize the aesthetic of the plots, as ggplots are widely used in publications, data journalism, and blog posts.

When you're using ggplot2, both as you're learning how to use it and even when you're more seasoned, the official RStudio ggplot2 cheat sheet will be a resource you may want to keep close for your reference. It will not only remind you of the basics (and more advanced implementations) of how to use ggplot2, it gives suggestions for which plots to use when you have certain types of variables (for example, if you have one...