rstudio / rmarkdown

Dynamic Documents for R
https://rmarkdown.rstudio.com
GNU General Public License v3.0
2.88k stars 979 forks source link

Display R notebooks on github #1020

Open DominiqueMakowski opened 7 years ago

DominiqueMakowski commented 7 years ago

Is there any integration between github and Rnotebooks? Like the one with jupyter notebooks, that are nicely displayed on github. I've tried to save the notebooks in different formats (.html, .nb.html, .pdf) but it does not work. Moreover, is it a way to integrate interactive features (plots with ggplotly for example)?

Thanks

shntnu commented 3 years ago

I'm considering yet another painful workaround, but it's probably not so bad: https://github.com/shntnu/gh-nbhtml

davesteps commented 3 years ago

FYI I have found jupytext can help as a workaround it allows you to 'pair' .Rmd documents with .ipynb

DABallentine commented 3 years ago

Hey all,

Sorry if I'm misunderstanding here, but I have been knitting the .Rmd notebook to a .md file within RStudio, and it seems to display very well in GitHub. You can see an example in my repo to see if I'm on track with this thread.

The links below give the explanation. Short Version: 1) change "output=html_document" to "output=github_document" 2) knit the document 3) push the .md file to GitHub instead of the .Rmd 4) be sure to push the '_files' folder to include any images

https://rmarkdown.rstudio.com/github_document_format.html https://gist.github.com/JoshuaTPierce/b919168421b40e06481080eb53c3fb2f

bbrewington commented 3 years ago

@DABallentine Good call - I think that's the current best way to do this. The above conversation is around actually rendering the .Rmd document on github similar to the nice rendering of .ipynb

Take a look at JJ Allaire's comment above: https://github.com/rstudio/rmarkdown/issues/1020#issuecomment-629278052

YoniGR94 commented 2 years ago

@DABallentine I just read all this, searching how to publish my Rstudio project in GitHub and we’re starting to loos hope till I saw your tip! Thanks a lot!

alex-roc commented 2 years ago

Any news on this?