Creating a list from a combination of vector, matrix, and data frame

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset