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.