Issue with knitr and projects


I have a project associated to a personal package, with a vignettes folder ; I created a vignette with usethis::use_vignette("my-vignette"), and I got a my-vignette.Rmd in the vignettes folder.
The header of this file is:

title: "Sunsound"
output: rmarkdown::html_vignette
vignette: >

In the DESCRIPTION file of my project, I have VignetteBuilder: knitr and the packages knitr, markdown and markdown as suggested.
When I check my package, I get no errors, no warnings and no note.
But the file my-vignette.html doesn't appear in my project. If I knitr the Rmd file (knit button), RStudio viewer says that the html output file is in /private/var/folders/1w/fl286mps55... (I'm on macOS).

If a open RStudio outside the project, and then knitr my-vignette.Rmd, I get the html output in the vignettes folder as expected.

Could you help me please ? Thank you in advance.

R 4.1.0
RStudio 1.4.1717
All packages updated (knitr, markdown, markdown)

I think this is the way it is supposed to work when you are building your package.

When your package is installed by a user with e.g. devtools::install_github("packagename",build_vignettes=TRUE)
the vignette (Rmd file) is knit-ted as part of the installation with the latest versions of the package and all dependent packages.
When you knit the vignette, it is only for checking that there are no mistakes in the vignette and for this check a temporary html file is sufficient

As an example see the vignettes folder of one of my GitHub projects. You only will see the Rmd version of the vignette, but after installing the package with
you will see the knit-ted vignette in the package documentation.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.