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 of a data frame
Accessing rows and columns combined in a data frame
Data frame analysis
Summary

Instruction

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:

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

Exercise

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.