A list is the natural generalization of a data frame in R. A data frame is a rectangular arrangement of rows and columns where each of the columns must be of the same length. A list can contain a variety of heterogeneous objects with various lengths and data types. An array contains only one data type, whereas a list could contain heterogeneous data types of various lengths. In that sense, a list is also a natural generalization of an array. A list is a versatile R object, and it is important to know how it stores elements and how you can access it. In this recipe, you will learn how to create a list and access its elements.
Creating a list from a combination of vector, matrix, and data frame
Getting ready
Recall that you...