長さ 0f 173 のリストがあり、その各要素には 48 の項目があります。これから 48 行 173 列になるデータフレームを作成したいと思います。アイテムの名前は重要ではなく、一致しないので、どうすればよいですか?
dput(tra[[1]][1:5,1:5])
structure(list(c..0.0....93.. = structure(c(1L, NA, NA, NA, NA
), .Label = c("0|0", "93"), class = "factor"), c..0.0....127.. = structure(c(1L,
NA, NA, NA, NA), .Label = c("0|0", "127"), class = "factor"),
c..0.0....127...1 = structure(c(1L, NA, NA, NA, NA), .Label = c("0|0",
"127"), class = "factor"), c..0.0....127...2 = structure(c(1L,
NA, NA, NA, NA), .Label = c("0|0", "127"), class = "factor"),
c..0.0....127...3 = structure(c(1L, NA, NA, NA, NA), .Label = c("0|0",
"127"), class = "factor")), .Names = c("c..0.0....93..",
"c..0.0....127..", "c..0.0....127...1", "c..0.0....127...2",
"c..0.0....127...3"), row.names = c("1", "NA", "NA.1", "NA.2",
"NA.3"), class = "data.frame")
私は試した:
> ft <- data.frame(matrix(unlist(tra), nrow=173, byrow=T))
Error in matrix(unlist(tra), nrow = 173, byrow = T) :
'data' must be of a vector type, was 'NULL'
AND
> traa <- do.call(rbind.data.frame, tra)
Error in match.names(clabs, names(xi)) :
names do not match previous names