Knitting an Rmarkdown document

How to render Rmarkdown documents reproducibly and save the output to the results folder

You can render Rmarkdown to allow your capsule to serve as a reproducible record of the analysis from start to finish

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

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

Other Ways of Knitting a Rmarkdown Document

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

Examples from the Code Ocean Public Platform of 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

Last updated