gpt4 book ai didi

r - xtable 标题保持在下方

转载 作者:行者123 更新时间:2023-12-03 23:26:28 26 4
gpt4 key购买 nike

我使用以下 Rsweave 代码创建了一个表。

<<fig=FALSE,results=tex ,echo=FALSE>>=
require('xtable')
res.table<-xtable(myfamDF, caption = 'Paired t-test of most common TF families', caption.placement="top", display = c('f','s','e','e','e','d','f','f','f'), table.placement="")

print(res.table, scalebox=0.7)

@

正如人们所见,我使用了代码caption.placement='top',但这不起作用。我一直在 table 下面看到我的标题。出了什么问题?我也尝试将命令放在标题之前,但仍然无效。

我的表数据:
structure(list(X = c("ETS", "FH", "HLH", "HMG", "Homeo", "Homeo ", 
"Homeo, POU", "IRF", "unknown", "Zn2Cys6", "ZnF_C2H2", "ZnF_C4"
), MASHvstRap = c(7.57756175712832e-05, 2.16501764489381e-05,
1.28838720843028e-05, 7.61948145586808e-26, 2.60621688448055e-53,
5.65846675050138e-11, 2.8351421540276e-06, 2.16501764489381e-05,
3.2934292268274e-24, 2.82352692734938e-05, 6.64390583188061e-16,
1.0825088224469e-05), MASHvsBEEML = c(0.000205676676264912, 0.00519604234774513,
0.00724381285695056, 0.864846903741683, 5.63594927321681e-06,
0.212004750633662, 0.519032309279987, 0.0114962436943861, 0.0364539615325715,
0.00226912148014415, 0.00150554384087195, 0.165493948775683),
tRapvsBEEML = c(1.0825088224469e-05, 1.0825088224469e-05,
5.2304674730304e-05, 3.24328889627148e-13, 8.6852178695266e-46,
7.60650709869649e-06, 2.8351421540276e-06, 1.0825088224469e-05,
1.35923430631341e-18, 1.03873566123765e-06, 4.36897483629527e-17,
1.0825088224469e-05), frequency = c(10L, 10L, 13L, 44L, 158L,
19L, 11L, 10L, 121L, 17L, 54L, 10L), Mash_mean = c(0.524697080582274,
0.533031100926345, 0.612272921172441, 0.554248028314286,
0.718880708100701, 0.669975051155167, 0.689738366117961,
0.523671096430599, 0.441776560865089, 0.379363597547222,
0.549419213423343, 0.662304821003215), BEEML_mean = c(0.666798180226875,
0.660863667642578, 0.744265111335818, 0.475324697683268,
0.730669935762911, 0.650768612120795, 0.704779617351813,
0.623826799121585, 0.487316361691942, 0.608017794324143,
0.637626824316619, 0.732392229673044), tRap_mean = c(0.297319284507052,
0.270211650098443, 0.261921495552034, 0.124938264266261,
0.171602908725421, 0.138827064266711, 0.180368231533709,
0.279573714498502, 0.162194901674355, 0.127782526341284,
0.249250520527459, 0.274929655041024)), .Names = c("X", "MASHvstRap",
"MASHvsBEEML", "tRapvsBEEML", "frequency", "Mash_mean", "BEEML_mean",
"tRap_mean"), class = "data.frame", row.names = c(NA, -12L))

最佳答案

您应该指定 caption.placementprint打电话,而不是 xtable .

res.table<-xtable(myfamDF, caption = 'Paired t-test of most common TF families', 
display = c('f','s','e','e','e','d','f','f','f'),
table.placement ="")

print(res.table, scalebox=0.7, caption.placement = "top")

关于r - xtable 标题保持在下方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17653885/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com