我有一個具有不同列集的數(shù)據(jù)框列表。我想將它們按行合并為一個數(shù)據(jù)幀。我曾經(jīng)plyr::rbind.fill這樣做。我正在尋找可以更有效地做到這一點的東西,但與此處給出的答案相似require(plyr)set.seed(45)sample.fun <- function() { nam <- sample(LETTERS, sample(5:15)) val <- data.frame(matrix(sample(letters, length(nam)*10,replace=TRUE),nrow=10)) setNames(val, nam) }ll <- replicate(1e4, sample.fun())rbind.fill(ll)
一種有效的方法來綁定具有不同列的data.frames
慕無忌1623718
2019-10-21 11:12:14