Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction to data frames
Data frame structure
4. Determining the number of rows in a data frame
Accessing columns in a data frame
Accessing rows and columns combined in a data frame
Data frame analysis


Perfect! What if we'd like to know how many rows a data frame has? The function nrow() takes the name of a data frame as its argument and returns the number of rows that data frame has. So, if you type:

R will return 205, which is number of cities that are potential candidates for Versico's market.


How many countries is Versico considering? Use the countries data frame.

Stuck? Here's a hint!

The number of countries is equal to the number of rows in the data frame.