I want to access the value which is nested under other list
x<-list(a=list(10,11,12),b=c(2,3))
I want to access the element 12
I want to access the value which is nested under other list
x<-list(a=list(10,11,12),b=c(2,3))
I want to access the element 12
Another thing to note here is that if you use
x$a[3]
[[1]]
[1] 12
i.e. the output will be a list while if you do the same for b as follows:
x$b[1]
[1] 2
the output will be a vector.