I have a list with vector elements like
> l
[[1]]
[1] 1 2
[[2]]
[1] 3 4
[[3]]
[1] 5 6
[[4]]
[1] 7 8
And I want to extract the second element in each vector to form a new vector l_vec = c(2,4,6,8)
. Is there a simple way in R to do this?
Thanks in advance!