library(pkgsite)
example_pkg <- system.file("example", package = "pkgsite")
rd_to_qmd(file.path(example_pkg, "man", "rd_to_qmd.Rd"), pkg = example_pkg)#> [1] "---"
#> [2] "title: \"Converts 'Rd' to Quarto files\""
#> [3] "execute:"
#> [4] " eval: true"
#> [5] " freeze: true"
#> [6] "---"
#> [7] ""
#> [8] "## rd_to_qmd"
#> [9] ""
#> [10] "## Description"
#> [11] "Converts 'Rd' to Quarto files"
#> [12] ""
#> [13] ""
#> [14] "## Usage"
#> [15] "```r"
#> [16] "rd_to_qmd("
#> [17] " rd_file,"
#> [18] " project = \".\","
#> [19] " pkg = NULL,"
#> [20] " examples = TRUE,"
#> [21] " not_run_examples = FALSE,"
#> [22] " template = NULL"
#> [23] ")"
#> [24] "```"
#> [25] ""
#> [26] "## Arguments"
#> [27] "|Arguments|Description|"
#> [28] "|---|---|"
#> [29] "| rd_file | The name of the source Rd file |"
#> [30] "| project | The path to the root folder of the project. |"
#> [31] "| pkg | The path inside the project folder. Use only if the R package itself is in a sub-folder within the project. |"
#> [32] "| examples | Flag that sets the examples code chunk to be evaluated when the Quarto document is rendered |"
#> [33] "| not_run_examples | Flag that sets the \"do not run\" examples code chunk to be evaluated when the Quarto document is rendered |"
#> [34] "| 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. |"
#> [35] ""
#> [36] ""
#> [37] "## Value"
#> [38] "A character vector with the resulting contents of converting the Rd file format into a Quarto file format."
#> [39] ""
#> [40] ""
#> [41] ""
#> [42] ""
#> [43] ""
#> [44] "## See Also"
#> [45] "Other Conversion functions: `index_to_qmd()`, `rd_to_list()`"
#> [46] ""
#> [47] "## Examples"
#> [48] "```r"
#> [49] "library(pkgsite)\nrd_to_qmd(\"rd_to_qmd.Rd\", project = \".\")"
#> [50] "```"