Here is a list
l1 = list(apple=c(2,23,43), pear = c(4,5), pineapple= 2, banana=97)
and here is the data.frame
I am trying to construct from this list.
data.frame(fruit = c("apple","apple","apple","pear","pear","pineapple", "banana"), number = c(2,23,43,4,5,2,97))
fruit number
1 apple 2
2 apple 23
3 apple 43
4 pear 4
5 pear 5
6 pineapple 2
7 banana 97
Can you help me with that?