The Verbs

Edited from Ben Baumer’s Lecture

Nic Schwab

dplyr lives in the tidyverse

SDS 100 Lab 4

In lab 4 you learned about these verbs:

  • select()

    • subsets columns
  • filter()

    • subsets rows
  • mutate()

    • creates new variables (or columns)
  • arrange() and arrange(desc())

We will also use:

  • group_by()

    • to group the data before summarizing
  • summarize()

    • to summarize data
  • rename()

    • to rename columns

The idea

You can get good at a few functions and do a lot.

The first argument is a data frame.

  • its a special kind called a tibble.

The output of the wrangling functions is a data frame.

When we wrangle we are not altering the original data.

  • It still exists.

  • You can start over.

What is a tibble?

Practice wrangling

In class MDSR Problems 1 and 2