library(pkgsite)
example_pkg <- system.file("example", package = "pkgsite")
write_reference_pages(pkg = example_pkg, target_folder = tempdir())
#> Converting .Rd to .qmd:
#> `/Users/edgar/Library/R/arm64/4.5/library/pkgsite/example/man/index_to_qmd.Rd`
#> →
#> `/var/folders/y_/f_0cx_291nl0s8h26t4jg6ch0000gp/T//RtmphxUDlq/index_to_qmd.qmd`
#>
#> `/Users/edgar/Library/R/arm64/4.5/library/pkgsite/example/man/rd_to_list.Rd`
#> →
#> `/var/folders/y_/f_0cx_291nl0s8h26t4jg6ch0000gp/T//RtmphxUDlq/rd_to_list.qmd`
#>
#> `/Users/edgar/Library/R/arm64/4.5/library/pkgsite/example/man/rd_to_qmd.Rd` →
#> `/var/folders/y_/f_0cx_291nl0s8h26t4jg6ch0000gp/T//RtmphxUDlq/rd_to_qmd.qmd`Converts the ‘Rd’ file into Quarto, and writes the file to a specified folder
write_reference_pages
Description
Converts the ‘Rd’ file into Quarto, and writes the file to a specified folder
Usage
write_reference_pages(
pkg = ".",
target_folder = NULL,
examples = TRUE,
not_run_examples = FALSE,
template = NULL,
quarto_file_path = NULL
)Arguments
| Arguments | Description |
|---|---|
| pkg | Path to the root of the R package. Defaults to ".". |
| target_folder | Path to the folder where the Quarto files will be written. Defaults to NULL, which resolves to "reference/" (or the dir value under pkgsite > reference in _quarto.yml if set). |
| examples | Flag that sets the examples code chunk to be evaluated when the Quarto document is rendered |
| not_run_examples | Flag that sets the “do not run” examples code chunk to be evaluated when the Quarto document is rendered |
| template | The path to a Quarto file that can be used as the template for all of the resulting reference files. If left NULL, pkgsite will use its default template. |
| quarto_file_path | Path to the folder containing _quarto.yml. Use when the Quarto project root differs from the package root (e.g. the package lives in a sub-folder of a larger Quarto project). Must be a directory path. Defaults to NULL, in which case pkg is used. |
Value
A set of Quarto files written to the specified path based on the number of Rd files in the package.
Examples
See Also
Other Quarto file creation: write_reference(), write_reference_index()