我有一个小小的 list :
my_list <- list(time = structure(c(0, 1), dim = 2:1, dimnames = list(c("Pre",
"Post"), "Post")), treatment = structure(c(0, 1), dim = 2:1, dimnames = list(
c("Control", "Treatment"), "Treatment")))
# that gives me:
$time
Post
Pre 0
Post 1
$treatment
Treatment
Control 0
Treatment 1
我想将其转换为数据帧,如下所示:
I have tried everything from this link, but it did not give me my desired df:
Convert a list to a data frame