2

I have an .rmd file containing working code for a Shiny interactive knitr/rmarkdown doc. I want this doc to run via GitHub pages.

How do I do this? (Can someone walk me through the steps clearly and fully).

  • I understand I have to create a gh-pages branch and upload the files there. However, I don't understand what to do with my .rmd file. Do I simply just resave it as an .html file? Or does an html file have to contain something in addition to the rmd file?

Please help explain this to me -- I've spent all day trying to figure this out, but I can;t get anything to work right :(.


Prior effort: I tried following the lead given by this SO.post, but the best I can get is a screen full of block text. No formatting, code or images show up. Just the whole document's text.

Community
  • 1
  • 1
theforestecologist
  • 4,667
  • 5
  • 54
  • 91
  • github doesn't run r... – HubertL Apr 21 '17 at 19:03
  • @HubertL see http://stackoverflow.com/questions/38138307/is-it-possible-to-host-interactive-r-markdown-files-on-github-pages – theforestecologist Apr 21 '17 at 19:03
  • this is not shiny's interactivity, it's plotly's – HubertL Apr 21 '17 at 19:05
  • 1
    The only way to run Shiny apps is with a Shiny server. You can either set up your own or use shinyapps.io. You can display HTML widgets but not Shiny apps. – Ian Wesley Apr 21 '17 at 19:45
  • 3
    It really depends what your knitr/rmarkdown looks like. If it's a `runtime: shiny` document you won't be able to as R needs to run in the background. If it's a "normal" markdown with plotly/ggplot plots where there is no R server running in the background, you can knit it to an html document and put that as the index.html of your github page. – NicE Apr 25 '17 at 12:32

0 Answers0