When I try to compile an Rmarkdown document to pdf, I get this error:
Error: Functions that produce HTML output found in document targeting latex output.
Have you tried the following? (FROM: https://bookdown.org/yihui/bookdown/html-widgets.html)
install.packages("webshot") webshot::install_phantomjs()
It worked for me. See also: https://github.com/rstudio/bookdown/issues/440