Unverified Commit b7513245 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[docs] [R-package] document how to regenerate roxygen docs (#5382)

parent bb5d5711
......@@ -18,6 +18,7 @@
* [Testing](#testing)
- [Running the Tests](#running-the-tests)
- [Code Coverage](#code-coverage)
* [Updating Documentation](#updating-documentation)
* [Preparing a CRAN Package](#preparing-a-cran-package)
* [External Repositories](#external-unofficial-repositories)
* [Known Issues](#known-issues)
......@@ -277,6 +278,29 @@ Rscript -e " \
"
```
Updating Documentation
----------------------
The R package uses [`{roxygen2}`](https://cran.r-project.org/web/packages/roxygen2/index.html) to generate its documentation.
The generated `DESCRIPTION`, `NAMESPACE`, and `man/` files are checked into source control.
To regenerate those files, run the following.
```shell
Rscript \
--vanilla \
-e "install.packages('roxygen2', repos = 'https://cran.rstudio.com')"
sh build-cran-package.sh --no-build-vignettes
R CMD INSTALL \
--with-keep.source \
./lightgbm_*.tar.gz
cd R-package
Rscript \
--vanilla \
-e "roxygen2::roxygenize(load = 'installed')"
```
Preparing a CRAN Package
------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment