Rsixygen
A (prototype) project for creating Roxygen documentation for R6 objects
Install / Use
/learn @jameslamb/RsixygenREADME
THIS PROJECT HAS BEEN ARCHIVED
As of roxygen2 version 7.0.x, roxygen2 has first-class support for doucmenting R6 objects. Using these features of roxygen2 to document R6 classes is an easier, less error-prone strategy.
rsixygen
There is no built-in support for R6 in roxygen2.
This package is experimental, and implements a standard proposed by @cwschultz88 for documenting these objects.
To be clear, it does NOT automatically generate full Roxygen docs the way that roxygen2::roxygenize() does. Instead, it dumps Roxygen skeletons to a directory of files. You will still have to do some manual work after this, but the package cuts down on a LOT of copy-pasting, indentation fixes, and general sadness around missing curly braces.
Installation
This package is not yet on CRAN. For now, just install from GitHub.
devtools::install_github('jameslamb/rsixygen')
Examples
All you have to do is this:
rsixygen::document_package("lightgbm", "some_docs")
That call will create a set of .R files (one per R6 class) in a new directory called some_docs/.
If you don't want to deal with the entire package, you can target an individual object:
rsixygen::document_class(lightgbm:::Booster)
I hope you find this useful. PRs are welcome!
