What's new

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

Nicole Seaman

Chief Admin Officer
Staff member
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.

David's R notebook file script is here: https://github.com/bionicturtle/youtube/tree/master/r-intro

YT sub small.png
Last edited: