Getting started with R for busy people

0 of 18 lessons complete (0%)

Get your data ready

9 – Prepare data

You don’t have access to this lesson

Please register or sign in to access the course content.

What you will learn in this lesson

  • How to rename and drop a column in a data frame
  • How to display the names of the columns in a data frame
  • How to use the pipe operator
  • How to use indentation, and why it makes code easier to debug
  • How to create new columns in a data frame
  • How to merge multiple data frames into one

In the previous lesson, we imported three files stored in three different variables: gdp_rawpopulation_raw and roads_raw. To continue our work, we need to merge them into a single data frame. Let’s call this unified data frame dep_all. To merge the data frames, we need to structure all three similarly. We will prepare each variable first, and then we will do the merging.

One aspect where the Tidyverse shines is when it comes to importing and preparing data. Almost all the functions we will use in this lesson come from the Tidyverse.

To access the rest, you need to buy the course

Buying the course immediately unlock all lessons

You can also buy a seat for the online workshop based on the course, or by buying the 1-to-1 experience

If you have already purchased the course, you can log in with the button at the top of the lesson