Introduction to lists

Extracting elements using {purrr}.

str(otherlist)
## List of 2
##  $ mango: num 100
##  $ nice :List of 2
##   ..$ sweet: logi TRUE
##   ..$ dirty: logi FALSE
purrr::pluck(otherlist, "nice", "dirty")
## [1] FALSE
str(anotherlist)
## List of 2
##  $ : chr "a"
##  $ :List of 2
##   ..$ : logi TRUE
##   ..$ : logi FALSE
purrr::pluck(anotherlist, 2, 1)
## [1] TRUE