我希望cbind
lm summary
存储在不同的列表中。我有 20 种不同的模型存储,所以我想cbind
手动 avoir。
你知道我该怎么做吗?
这是我的一个样本list
data = list(structure(list(`a alone` = structure(c(4L, 5L, 1L, 2L, 3L
), .Names = c("(Intercept)", "isexMALE", "numchild_rec1", "numchild_rec2",
"numchild_rec>2"), .Label = c("-59.819", "-61.193", "-72.312",
"126.679", "9.825"), class = "factor"), pvalue = structure(c(2L,
1L, 2L, 2L, 2L), .Names = c("(Intercept)", "isexMALE", "numchild_rec1",
"numchild_rec2", "numchild_rec>2"), .Label = c(" ", "***"), class = "factor")), .Names = c("a alone",
"pvalue"), row.names = c("(Intercept)", "isexMALE", "numchild_rec1",
"numchild_rec2", "numchild_rec>2"), class = "data.frame"), structure(list(
`b partner` = structure(c(4L, 5L, 1L, 2L, 3L), .Names = c("(Intercept)",
"isexMALE", "numchild_rec1", "numchild_rec2", "numchild_rec>2"
), .Label = c("-222.064", "-259.233", "-277.213", "365.149",
"8.608"), class = "factor"), pvalue = structure(c(2L, 1L,
2L, 2L, 2L), .Names = c("(Intercept)", "isexMALE", "numchild_rec1",
"numchild_rec2", "numchild_rec>2"), .Label = c(" ", "***"
), class = "factor")), .Names = c("b partner", "pvalue"), row.names = c("(Intercept)",
"isexMALE", "numchild_rec1", "numchild_rec2", "numchild_rec>2"
), class = "data.frame"), structure(list(`c child` = structure(c(4L,
1L, 5L, 2L, 3L), .Names = c("(Intercept)", "isexMALE", "numchild_rec1",
"numchild_rec2", "numchild_rec>2"), .Label = c("-36.267", "112.03",
"119.228", "23.706", "86.989"), class = "factor"), pvalue = structure(c(1L,
2L, 2L, 2L, 2L), .Names = c("(Intercept)", "isexMALE", "numchild_rec1",
"numchild_rec2", "numchild_rec>2"), .Label = c("**", "***"), class = "factor")), .Names = c("c child",
"pvalue"), row.names = c("(Intercept)", "isexMALE", "numchild_rec1",
"numchild_rec2", "numchild_rec>2"), class = "data.frame"))
我想得到这样的输出
a alone pvalue b partner pvalue c child pvalue
(Intercept) 126.679 *** 365.149 *** 23.706 **
isexMALE 9.825 8.608 -36.267 ***
numchild_rec1 -59.819 *** -222.064 *** 86.989 ***
numchild_rec2 -61.193 *** -259.233 *** 112.03 ***
numchild_rec>2 -72.312 *** -277.213 *** 119.228 ***