To publish on Code Ocean, we ask that code be executed as a whole, so it can serve as a reproducible record of the analysis from start to finish.

You can do this by kniting an Rmarkdown file into a final report in your /results folder. Add the following Rmarkdown::render command )from the Rmarkdown library) to your master script:

Rscript -e "rmarkdown::render(input = 'my-awesome-notebook.rmd', output_dir = '../results', clean = TRUE)"

Note: You may also need to add pandoc via apt-get, as well as LaTeX if you're rendering to PDF (here's how). See using Code Ocean's package management system.

Other Ways of Knitting an Rmarkdown Document

If you can also press the 'Knit' button from within an Rstudio Cloud Workstation session on Code Ocean.

Example Capsules using Rmarkdown

https://codeocean.com/2018/08/01/mapping-the-universe-of-registered-reports

https://codeocean.com/2018/06/21/data-availability-reusability-and-analytic-reproducibility-colon-evaluating-the-impact-of-a-mandatory-open-data-policy-at-the-journal-cognition

https://codeocean.com/2018/10/16/the-contact-hypothesis-re-evaluated-colon-code-and-data

Did this answer your question?