Session Ready
Exercise

Subsetting vectors continued...

In the previous question, we accessed the temperature for consecutive cities (1st three). But what if we want to access the temperatures for any 2 specific cities?

An example: To access the cost of pizza (1st) and pasta (5th food item) in our list, the code would be:

cost[c(1,5)]
Instructions
100 XP

This time we will access our object using just the [ operator. Use the [ operator to access the temperature of Paris and San Juan already stored in the temp object.