0

I want to write a vignette explaining my R package. Inside the vignette, I want to explain one input to a certain function.

Basically, what I would write in the vignette is the same as I wrote in the @param section of the roxygen comments to my function.

To avoid writing the same things twice, is there a way that I can insert the roxygen2 description of a function input into a vignette?

  • You can always use templating (e.g. Jinja) and call it as a git pre-commit hook. This replaces placeholders with values in any text file. – danlooo Dec 02 '21 at 10:08
  • `glue` is another alternative that may be suitable, but I don't know how it compares `jinjar`. – mhovd Jan 22 '22 at 11:18

1 Answers1

1

The printr package of Yihui Xie provides what I need, see https://cran.r-project.org/web/packages/printr/vignettes/printr.html#help-pages.