development_docs/generating_documentation.md

How to generate documentation files

We use roxygen2 (https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html) to produce all the code documentation. All code documentation is written in the package R files above the corresponding code (e.g. every function has its documentation written directly above it).

Updating the man folder

We then have a folder called man in the repository, which is generated by opening the package in RStudio and then type:

devtools::check_man()

Building a PDF of the documentation

To build the documentation you need to have a working latex installation.

  1. Open the DetectorChecker package in R studio (click file -> open project, then select the DetectorChecker folder).

  2. Update the man folder. To do this run devtools::check_man() in the console.

  3. Make sure R's current working directory is set to the DetectorChecker folder. Then in the console run:

devtools::build_manual()

This will create a pdf of the documentation.



alan-turing-institute/DetectorChecker documentation built on Jan. 3, 2021, 10:37 a.m.