Skip to Content
Modifying Data Frames in R

When working with data frames, you often need to modify the columns for your analysis at hand. With the help of the dplyr package, data frame modifications are easily performed.

In this lesson, you’ll learn how to modify an existing data frame using dplyr. Some of the skills you’ll learn include:

  • adding columns to an existing data frame
  • adding new columns and dropping existing columns from a data frame
  • renaming columns


In notebook.Rmd data from the American Kennel Club (AKC) is loaded into a data frame. The data covers two categories of dog data:

  • dog breed size, including lower and upper bounds for height (inches) and weight (pounds)
  • dog breed popularity, including popularity ranks from 2013, 2014, 2015 and 2016

Review the code and take a look at the rendered notebook. What do you think the fourth and fifth code blocks accomplish?

Proceed to the next exercise when you’re ready to start working with this data and modifying data frames!

Happy dog that loves dplyr

Folder Icon

Take this course for free

Already have an account?