I am trying to include small icons (saved as .png files) in the footnotes of my R Markdown document, which will be converted to a PDF file. I want these icons to provide additional visual information within the footnotes, but I am encountering difficulties achieving this.
I have attempted to use the HTML tag and LaTeX's \includegraphics package, but the icons are not displaying correctly in the PDF output. Can anyone provide guidance on how to successfully include these icons in the footnotes of a PDF generated from R Markdown?
Thank you in advance for your assistance!
# Load the required librarieslibrary(kableExtra)library(dplyr)# Create example data data <- data.frame( Category = c("Toyota", "Honda", "Ford", "Nissan"), Count = c(50, 60, 45, 55), Minimum = c(100, 110, 95, 105), Maximum = c(200, 210, 195, 205))# Define a vector with image links and descriptions in a footnotefootnote_text <- c("Decreasing < -5% ","Slightly Decreasing -5 to -1% ","Stagnant -1 to +1% ","Slightly Increasing +1 to +5% ","Increasing > +5% ")# Create the table with adjusted column namestable <- kbl(data, booktabs = TRUE, col.names = c("Category", "Count", "Min", "Max")) %>% kable_styling(latex_options = c("striped"), font_size = 10, position = "center") %>% add_header_above(c(" " = 1, "(n)" = 1, "in Dollars" = 2)) %>% add_header_above(c(" " = 1, "Count" = 1, "Values" = 2))%>% add_footnote(footnote_text, notation="none")# Display the tabletable