I have a single list of numeric vector and I want to combine them into one vector. But I am unable to do that. This list can have one element common across the list element. Fin
You want rle:
rle(unlist(lst))$values > lst <- list(`1`=1:2, `2`=c(2,4,5), `3`=c(5,9,1)) > rle(unlist(lst))$values ## 11 21 22 31 32 33 ## 1 2 4 5 9 1