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).
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()
To build the documentation you need to have a working latex installation.
Open the DetectorChecker package in R studio (click file -> open project, then select the DetectorChecker folder).
Update the man folder. To do this run devtools::check_man()
in the console.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.