I have a list of list as follow :
l = list(list(v = numeric(0), pos = 10), list(v = numeric(0), pos = 10),
list(v = numeric(0), pos = 10), list(v = 1.227, pos = 19),
list(v = 1.227, pos = 19), list(v = 15.2, pos = 19))
I would like to extract element v from each list.
I have checked this slution, but it does not work for me. The first method using rapply and unique function will include the pos values as well and also I would like to keep all v values even if they are repeated or they are zero or numeric(0) !
The second method with :
matrix(unlist(l),ncol=2,byrow=TRUE)
Is also not working because I have some numeric(0) in my lists for the value v !