2
我似乎無法得到以下工作[R問題適用+ rbind
directory <- "./"
files.15x16 <- c("15x16-70d.out", "15x16-71d.out")
data.15x16<-rbind(lapply(as.array(paste(directory, files.15x16, sep="")), FUN=read.csv, sep=" ", header=F))
它所應該做的是非常簡單的 - 我有一個目錄名,一些文件名和實際文件數據。我將目錄和文件名粘貼在一起,從文件中讀取數據,然後將它們全部組合到一個數據塊中。
除lapply的結果具有數據在[[]]
- 即,訪問它經由a[[1]], a[[2]],
等似乎這rbind
不接受發生。
對此提出建議?
看看http://stackoverflow.com/questions/2104483/how-to-read-table-multiple-files-into-a-single-table-in-r – Marek 2010-05-25 19:20:50
還有一些「不完全一致」相同「:http://stackoverflow.com/questions/2209258/merge-several-data-frames-into-one-data-frame-with-a-loop,http://stackoverflow.com/questions/1562124/merge-many-data-frames-from-csv-files – Marek 2010-05-25 19:24:00