问题
I know that it's impossible to put shiny app in pdf latex directly, but I've heard (How to embed an interactive shiny plot in a pdf / presentation? (via knitR maybe) HubertL's answer) it's possible to bind it via link. Can someone help me with that? I haven't found anything about this. I'm using beamer Madrid (Idk if it's important).
回答1:
You have to publish the Shiny app first. Once you have got the URL to the online app, you can use knitr::include_url()
to include an automatic screenshot of the app in non-HTML output formats. See https://bookdown.org/yihui/bookdown/web-pages-and-shiny-apps.html for more information.
Note that this feature currently requires the webshot package and PhantomJS:
install.packages("webshot")
webshot::install_phantomjs()
来源:https://stackoverflow.com/questions/50554584/embeding-shiny-app-in-pdf-latex-r-knitr