xtable中的R标记脚注

xtable中的R标记脚注,r,r-markdown,R,R Markdown,我的R降价报告中有一个脚注没有出现在表格下面,我对此有意见。下面是我用来处理的代码,它可以成功地处理,但表下没有脚注 ```{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",

我的R降价报告中有一个脚注没有出现在表格下面,我对此有意见。下面是我用来处理的代码,它可以成功地处理,但表下没有脚注

```{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"))
```
`{r ccxtable7,results=“asis”,echo=FALSE}
注释
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))

哇!我真傻。它在运行后工作。谢谢你,甘巴!