do.call rbind的问题

时间:2015-11-05 19:35:29

标签: r rbind

我有以下F1(F1.txt):

"sequence" "support"
"1" "<{EADFE20F543836047330DEFFB893127AF536560121698ADE2FCE6985E07A40D8 SELECT;DD2E595CF23E65E128560B655E0C6848 SELECT}>" 0.286903266331658
"2" "<{F73431225ED64969DC4BEBD06092FD6F SELECT}>" 0.121309673366834
"3" "<{88FFF14FDD46ED862DAEB36F8D0F6215 SELECT}>" 0.0820508793969849

和其他文件(F2.txt):

"sequence" "support"
"1" "<{6A5167FBE316A83E1AB22FB3371D2E48 CREATE TEMP TABLE}>" 0.0808225046408682
"2" "<{6A5167FBE316A83E1AB22FB3371D2E48 SELECT}>" 0.0808225046408682
"3" "<{6A5167FBE316A83E1AB22FB3371D2E48 INSERT}>" 0.0808225046408682

我使用以下命令读取每个命令:

F1 <-read.table (file.choose(), header = FALSE,sep = ",")
F2 <-read.table (file.choose(), header = FALSE,sep = ",")

然后使用:

FF <- do.call(rbind,list(F1,F2))

我得到FF就像:

> head (FF)
                                                                                                                                                V1
1                                                                                                                                 sequence support
2          1 <{EADFE20F543836047330DEFFB893127AF536560121698ADE2FCE6985E07A40D8 SELECT;DD2E595CF23E65E128560B655E0C6848 SELECT}> 0.286903266331658
3                                                                                  2 <{F73431225ED64969DC4BEBD06092FD6F SELECT}> 0.121309673366834

V1来自哪里?

1 个答案:

答案 0 :(得分:1)

感谢所有评论者: read.table应该是:

F1 <-read.table (file.choose(), header = TRUE)
F2 <-read.table (file.choose(), header = TRUE)