Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 6 个数字列表,每个列表都包含不同数量的值,即 [1:350] , [1:450] .... 。我正在尝试使用 rbind() 将所有这些列表附加到单个列表中,即 [1:1050],但我得到的输出是 [1:350, 1:6] 的数据帧。
有人可以帮我解决这个问题。
要连接多个列表,您可以使用c()
c()
x <- list(1, 2:5) y <- list("A", "B") z <- list(letters[1:5]) c(x, y, z) # [[1]] # [1] 1 # # [[2]] # [1] 2 3 4 5 # # [[3]] # [1] "A" # # [[4]] # [1] "B" # # [[5]] # [1] "a" "b" "c" "d" "e"