Introduction to lists
If multiple elements are provided to c()
, it tries to flatten them to one level:
- usually creates a vector
- creates a flat list if one element is a list (can be hierarchical) and another isn’t
## $mango
## [1] 100
##
## $nice.sweet
## [1] TRUE
##
## $nice.dirty
## [1] FALSE
## [[1]]
## [1] "a"
##
## [[2]]
## [1] TRUE
##
## [[3]]
## [1] FALSE