R Markdown Footnote in xtable

I am having problems with a footnote that does not appear below the table in my R Markdown report. Below is the code that I use for processing, which runs successfully, but without the footnote appearing below 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 row matrix. Can someone help me understand why the footnote is not showing under the table with this current code?

0
source share
1 answer

add.to.row (as well as hline.after ) are arguments to 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)) 

enter image description here

0
source

All Articles