5) Lists
๐ Lecture
In this week, we discuss lists, which are the most generic kind of data container in R.
๐ฏ Objectives
At the end of this week you will be able to:
- Describe in what sense a list is a one-dimensional object
- Describe in what sense a list is like a โtrain with wagonsโ
- provide an example of subsetting with single brackets (e.g.
lis[index]
) - provide an example of subsetting with double brackets, and a single element
lis[[index]]
) - provide a manipulation example with the dollar operator (e.g.
lis$wagon
)
๐ Reading
๐ฌ Lab
You will work creating and manipulating lists.