Reputation: 117
So now I have a list look like this:
$a [1] 2 $b [1] 5 $c [1] 3
Just wonder if there's a way to make them become:
$a [1] 1 2 $b [1] 1 2 3 4 5 $c [1] 1 2 3
Thank you very much for your answer!!
Upvotes: 4
Views: 52
Reputation: 887951
We can use seq
seq
lapply(lst1, seq)
Upvotes: 2