本文介绍了xtable 中的 R Markdown 脚注的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的 R Markdown 报告中的表格下方没有出现脚注的问题.下面是我用来处理的代码,该代码成功执行,但表格下方没有出现脚注.
I'm having issues with a footnote not appearing under a table in my R Markdown report. Below is the code I'm using to process which does successfully but with no footnote appearing under the table.
```{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 的字符串矩阵.有人能帮我理解为什么脚注没有出现在带有当前代码的表格下方吗?
indPctChCC is a 3x5 matrix of strings. Could someone help me understand why the footnote is not appearing under the table with this current code?
推荐答案
add.to.row
(还有 hline.after
)是 的参数打印
函数,而不是xtable()
.
add.to.row
(and also hline.after
) are arguments of the print
function, not xtable()
.
这应该可以让你到达你想要的地方:
This should get you where you want:
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))
这篇关于xtable 中的 R Markdown 脚注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!