Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
Introduction to data frames
Data frame structure
Accessing columns in a data frame
Accessing rows and columns combined in a data frame
Data frame analysis
22. Simple column analysis


Nicely done! You can perform different kinds of analyses with data frames. We've already mentioned that a data frame column is a vector. You can use vector analysis functions like min(), max(), mean(), median(), etc. on a data frame column.

For example, the Versico management can calculate the median population for the countries they are considering with the following code:


Likewise, we can calculate the average population for candidate cities:



The population column of the countries data frame stores the number of people living in a particular country in Western or Eastern Europe.

Versico wants to focus on expanding its business to only the largest countries, so it would like to rule out the single smallest country from its candidate list. How many people live in the European country with the smallest population?

Stuck? Here's a hint!

Use the countries$population and the min() function.