1

I have an object with each row being a dataframe or list itself like this:

[[1]]
1: a b c d
   1 1 2 4

[[2]]
1: a b c d
   4 3 6 2

[[3]]
1: a b c d 
   1 2 2 1

How can I transform this to a dataframe like below?

a b c d 
1 1 2 4
4 3 6 2
1 2 2 1
A4747
  • 61
  • 6

1 Answers1

1

We can use rbindlist

library(data.table)
rbindlist(lst1)

Or with rbind and do.call in base R

do.call(rbind, lst1)
akrun
  • 789,025
  • 32
  • 460
  • 575