On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Create new variables
4. Create a new column
Grouping and statistical functions
Joining datasets


Good job! But one more thing – we need to assign this result to a new variable!

To assign data to a variable calculated by %>%, we start with the new variable name. Next, we list the dataset and write the operation(s) that will generate the data.

In our earlier example, this would be:

countries2 <-
  countries %>%
  mutate(america = if_else(continent == "North America" | continent == "South America",


Assign the result of the query from the previous exercise to the countries_urban variable.

Stuck? Here's a hint!


countries_urban <- countries %>%
  mutate(urban_country = if_else(urban_pop_pc >= 65, TRUE, FALSE))