Suppose I have list inside which I have again list of different length.
animals <- list(mammals = list("cat", "dog", "bear"), amphibians = list("frog"))
If the insider list length is greater than 1, then it will split to vector and at the end I will have a list of different animal vector.
I am attaching here my desired output which I have hard coded. I am looking for some function which will do that for me.