我想组合来自两个数据框的表,并希望将该表导出到乳胶。我要创建的表如下所示。请注意,下表是使用 excel 创建的。
从 RI 中的 xtable 能够导出两个单独站点的表。获得两个站 T1 和 T2 的以下内容。如何组合两个站的输出以获得上述所需的输出?
T1 站:
> stT1
Observed-modeled |observed-modeled|
Min. -1.5360000 0.0001891
1st Qu. 0.0002512 0.1633000
Median 0.3593000 0.5390000
Mean 0.8554000 1.0020000
3rd Qu. 1.6470000 1.6470000
Max. 5.5370000 5.5370000
> dput(stT1)
structure(list(`Observed-modeled` = c(-1.536, 0.0002512, 0.3593,
0.8554, 1.647, 5.537), `|observed-modeled|` = c(0.0001891, 0.1633,
0.539, 1.002, 1.647, 5.537)), .Names = c("Observed-modeled",
"|observed-modeled|"), row.names = c("Min.", "1st Qu.", "Median",
"Mean", "3rd Qu.", "Max."), class = "data.frame")
T2站:
> stT2
Observed-modeled |observed-modeled|
Min. -2.3740 0.001259
1st Qu. -1.2280 0.674700
Median -0.6202 1.101000
Mean -0.2094 1.085000
3rd Qu. 0.7418 1.413000
Max. 5.0530 5.053000
> dput(stT2)
structure(list(`Observed-modeled` = c(-2.374, -1.228, -0.6202,
-0.2094, 0.7418, 5.053), `|observed-modeled|` = c(0.001259, 0.6747,
1.101, 1.085, 1.413, 5.053)), .Names = c("Observed-modeled",
"|observed-modeled|"), row.names = c("Min.", "1st Qu.", "Median",
"Mean", "3rd Qu.", "Max."), class = "data.frame")
我将两个站点组合如下:
newstT <- cbind(stT1,stT2)
> newstT
Observed-modeled |observed-modeled| Observed-modeled |observed-modeled|
Min. -1.5360000 0.0001891 -2.3740 0.001259
1st Qu. 0.0002512 0.1633000 -1.2280 0.674700
Median 0.3593000 0.5390000 -0.6202 1.101000
Mean 0.8554000 1.0020000 -0.2094 1.085000
3rd Qu. 1.6470000 1.6470000 0.7418 1.413000
Max. 5.5370000 5.5370000 5.0530 5.053000
我无法在顶部添加站 T1 和站 T2,如所需的图所示。