so I have a data frame
employee <- c('John Doe','Peter Gynn','Jolie Hope') pic_url <- c('url_Johns Picture', 'url_Peters Picture', 'url_Jolies Picture') df <- data.frame(employee, pic_url) which looks like this
employee pic_url 1 John Doe url_Johns Picture 2 Peter Gynn url_Peters Picture 3 Jolie Hope url_Jolies Picture When I try to knit an HTML based on this table, I'd first source the R file in a Rmd file and create a table using
source(myrfile.R) df %>% kable() But this gives me error and after a long struggle, I figured it is because image url links should not be in code blocks. But I cannot think of how to include images inside my table without using code block. I am learning how to use knitr so I would really appreciate it if you guys can show me a way using knitr or basic R. Thank you in advance!

kable, copy its output and put it into the document not inside a code blockdata.frame(a = 1:3, image = paste0('')) %>% knitr::kable()and keep things in a codeblock.