Learn R - Explore the 1985 Cars Dataset (Task 12)

Hi all!

I’m currently working on the project Explore the 1985 Cars Dataset in the Learn R course: https://www.codecademy.com/courses/learn-r/projects/1985-cars-r-project

I’m stuck on Task 12, and can’t seem to figure out the goal of the task itself. I’ve included tasks 12 and 13 below. I think I’m for sure doing 12 incorrectly, if not 13 as well.

  • Task 12: There’s a lot of makes of cars to choose from, but you may prefer one over the others. Which make do you prefer the most? Create a variable called chosen_make that contains the make you want to check. The hint below provides the list of makes to choose from.
  • Task 13: Filter cars to only include rows where the make column is equal to chosen_make . Save the new dataframe to chosen_make_details .

Task 12


# choose make

chosen_make <- cars %>%

filter(make == 'subaru')

Task 13


# filter rows by make

chosen_make_details <- cars %>%

filter(make == chosen_make)

head(chosen_make_details)

Task 12 just wants you to define the variable.

In your case it would be:

chosen_make <- 'subaru'