Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Quiz
6. Exercise 6

Instruction

Well done!

The quantity of goods transported to each city is recorded in the quantity column. Let's check how many products we need to transport to each country.

We'll do this for company_a only, since the demand per city is the same for the other two companies.

Exercise

For the first member of the companies list, do the following: For all cities that are not production centers, display the names of the countries they belong to.

A city is a production center if the production_center column stores "Y" and is not a production center if the production_center column stores "N".

Stuck? Here's a hint!

Type:

countries_without_PC <- companies[[1]][companies[[1]]$production_center == 'N', ]$country