I have this list:
a <- list()
a[[1]] <- matrix(c(1,2),nrow = 2)
How do I select element 2?
I have this list:
a <- list()
a[[1]] <- matrix(c(1,2),nrow = 2)
How do I select element 2?
a[[1]]
as it is the first element in the list - and then access the second element of the array - a[[1]]][[2]]
or a[[1]][2]
.
a[[1]][[2]]
[1] 2