Lists & Data Frames
Estimated Completion Time
About 100–130 minutes, including practice exercises and knowledge quizzes.
In this module, we’ll cover two more of R’s essential data structures: lists and data frames. Where vectors and matrices (covered in the previous module) require every element to share the same type, lists and data frames are built specifically to hold mixed types of data.
Content is split into two tutorials:
- Lists
- Data Frames (including a short, optional preview of tibbles)
Learning Goals
After completing this module, you will be able to:
Lists
- Describe the characteristics of an R list.
- Describe important use-cases for lists, and explain why lists are the best choice in these situations.
- Create new lists in R.
- Access and modify list elements using different methods, and explain the difference between the available selection operators.
Data Frames
- Describe the characteristics of data frames.
- Explain important use-cases for data frames, and explain why data frames are the best choice in these situations.
- Create new data frames in R.
- Explain how data frames and lists are related.
- Explain the differences between data frames and matrices.
- Use list-style and matrix-style indexing to access and modify the elements of a data frame.
- Explain the different effects of the available selection operators.
- Explain how recycling works with data frames.
Click the button below to get started!