Key Concepts

Review core concepts you need to learn to master this subject

dplyr package

The dplyr package provides functions that perform data manipulation operations oriented to explore and manipulate datasets. At the most basic level, the package functions refers to data manipulation “verbs” such as select, filter, mutate, arrange, summarize among others that allow to chain multiple steps in a few lines of code. The dplyr package is suitable to work with a single dataset as well as to achieve complex results in large datasets.

Aggregates in R
Lesson 1 of 1
  1. 1
    In this lesson you will learn about aggregates in R using dplyr. An aggregate statistic is a way of creating a single number that describes a group of numbers. Common aggregate statistics include m…
  2. 2
    In this exercise, you will learn how to combine all of the values from a column for a single calculation. This can be done with the help of the dplyr function summarize(), which returns a new da…
  3. 3
    When we have a bunch of data, we often want to calculate aggregate statistics (mean, standard deviation, median, percentiles, etc.) over certain subsets of the data. Suppose we have a grade book w…
  4. 4
    Sometimes, we want to group by more than one column. We can do this by passing multiple column names as arguments to the group_by function. Imagine that we run a chain of stores and have data abo…
  5. 5
    While group_by() is most often used with summarize() to calculate summary statistics, it can also be used with the dplyr function filter() to filter rows of a data frame based on per-group metrics….
  6. 6
    group_by() can also be used with the dplyr function mutate() to add columns to a data frame that involve per-group metrics. Consider the same educational technology company’s enrollments table fro…
  7. 7
    This lesson introduced you to aggregates in R using dplyr. You learned: How to calculate summary statistics with summarize() How to perform aggregate statistics over individual rows with the…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo