luca2
7/21/2017 - 3:04 PM

small notes about data structures in R

small notes about data structures in R

  • To select elements from embedded lists, it could be better to use chained selection.
    If, say: lst <- list('a' = list('a1' = 11, 'a2' = 12), 'b' = list('b1' = 21, 'b2' = 22))
    then: lst[['a']][['a2']] == lst[[c('a', 'a2')]]