我有一个这样的列表:
lst <-
list(structure(c("1", "[19]"), .Dim = 1:2), structure("1", .Dim = c(1L,
1L)), structure(c("1", "[41]"), .Dim = 1:2), structure(c("1",
"[55]"), .Dim = 1:2), structure(c("1", "[56]"), .Dim = 1:2),
structure(c("1", "[84]"), .Dim = 1:2))
如何将其转换为tibble
:
rslt <-
tibble(batch=c(1,1,1,1,1,1), id=c("[19]","","[41]","[55]","[56]","[84]"))
# A tibble: 6 x 2
batch id
<dbl> <chr>
1 1 [19]
2 1
3 1 [41]
4 1 [55]
5 1 [56]
6 1 [84]