使用完整的行输出填充Dataframe

时间:2016-03-01 11:04:59

标签: r merge dataframe rbind cbind

我对这个问题有点困惑: {{3}}。

我的模型的各个部分都有一个非常大的输出,它在tab2<-cbind (tab.info, tab1, summary) str (tab2) chr [1, 1:21] "EBF" "H2O" "517" "51" "8050" "1e-04" "0.7" "3" "poisson" "0.704811263414307" ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:21] "V1" "V2" "n.obs" "n.sites" ... 上运行。输出汇总在一行中,并带有相关值。

model.results

我想将此行绑定到空矩阵model.results <- data.frame(Landclass= character(0), Resource = character(0), n.obs= integer(0), n.sites= integer(0), n.trees= integer(0), learning.rate= numeric(0), bag.fraction= numeric(0),tree.complexityn.trees= integer(0), family= character(0), mean.deviance= numeric(0), mean.residual.dev= numeric(0), cv.correlation= numeric(0), correlation.mean= numeric(0), correlation.se= numeric(0), alt= numeric(0),bio1= numeric(0), bio12= numeric(0), distance= numeric(0), lat= numeric(0), lon= numeric(0), ndvi= numeric(0)) model.results<-rbind(tab2) > model.results V1 V2 n.obs n.sites V5 V6 V7 V8 V9 V10 V11 V12 V13 1 EBF H2O 517 51 8050 1e-04 0.7 3 poisson 0.704811263414307 0.604995121681059 0.366088115802614 0.19475244146538 V14 V15 V16 V17 V18 V19 V20 1 0.0456416292878939 9.89162170209534 2.2197735719569 10.4033471885163 1.98746621353663 27.1499947776137 13.3029282417277 V21 1 35.0448683045534 ,但每次执行此操作时,标题都会消失,并且不会添加新行。

{{1}}

有什么建议吗?

0 个答案:

没有答案