Embeding shiny app in pdf latex (R knitr)

纵饮孤独 提交于 2019-12-11 08:42:51

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!