Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 211995

Kable footnotes with math equation and alphabetic notes

$
0
0

I'm having trouble with kable and R Markdown. I would like to create a table with footnotes: 1. a bit of math formula (enter image description here), 2. with alphabetical notes, 3. and I would like the notes a and b to also show up next to var_a and var_b in superscript.

I can make the table, but the moment I add the footnotes I get an error msg.

var_a <- rep(0, 3)
var_b <- rep(1,3)
var_c <- rep(2, 3)

df <- data.frame(var_a=var_a, var_b=var_b, var_c=var_c)

kable(df, "latex", caption = "title", booktabs = T) %>%
  kable_styling() %>%
  add_footnote("Standard errors in parenthesis. P-values in brackets.", "P-values from Wald-test for $H_0$ Hazard Ratio = 1.",
               footnote_order = c("alphabet", "alphabet"))

EDIT:

This is the error msg I get:

Error in add_footnote(., "Standard errors in parenthesis. P-values in brackets.",  : 
  unused argument (footnote_order = c("alphabet", "alphabet"))

Viewing all articles
Browse latest Browse all 211995

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>