What's new

# YouTubeR Programming: Introduction: List Data Structure (R Intro - 02)

#### Nicole Seaman

Unlike atomic vectors, list (vectors) are flexible: each element can be a different type (char, integer, numeric, logical or even a sub-list!). List returns the i-th element as a list, while list[] returns the element as a vector. If the element is named, then list[["name"]] = list[] = list$name, so most useful is typically list$name. At the end of the video, David shows how that it's easy to ask R to generate a linear regression model and the result is a list of 12 elements; e.g., the first element is a vector of the coefficients.