gpt4 book ai didi

xtable 中的 R Markdown 脚注

转载 作者:行者123 更新时间:2023-12-04 16:09:51 27 4
gpt4 key购买 nike

我遇到问题,脚注没有出现在我的 R Markdown 报告中的表格下方。下面是我用来处理的代码,它成功执行但表格下方没有出现脚注。

```{r ccxtable7, results="asis", echo=FALSE}
comment <- list(pos = list(0), command = NULL)
comment$pos[[1]] <- c(nrow(indPctChgCC))
comment$command <- c(paste("\\hline\n",
"{\\footnotesize Note: * signifies number of
properties used was 35 or less.}\n", sep = ""))

print(xtable(valPctCon(indPctChgCC, indfreqCC, 35), align = "crrrrr",
label = "tab:indCC", add.to.row = comment, hline.after = c(-1,0),
caption = "Industrial Certified-Certified Percentage Change per Value Segment"))
```

indPctChCC 是一个 3x5 的字符串矩阵。有人可以帮助我理解为什么脚注没有出现在当前代码的表格下方吗?

最佳答案

add.to.row(还有 hline.after)是 print 函数的参数,而不是 xtable()

这应该可以让你到达你想要的地方:

print(xtable(tab, align = "crrr", 
label = "tab:indCC",
caption = "Industrial Certified-Certified Percentage Change per Value Segment"),
add.to.row = comment,
hline.after = c(-1,0))

enter image description here

关于xtable 中的 R Markdown 脚注,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44422428/

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