I wrote an R package for internal purposes and also added some vignettes. When I use devtools::install(build_vignettes = TRUE)
, all vignettes are installed properly on my machine. But in order to distribute the package to colleages, I would like to generate a windows binary.
But when I use Build binary package from the RStudio Build pane, the vignettes will not show up when the package is installed from the generated binary. I figured that I could move the vignettes from doc
to inst/doc
before building the binary package, but this needs to be done manually whenever a vignette changes.
From R CMD INSTALL --help
I could not figure if there is an option to include building the vignettes.
Is there any better option available than manually copying the files from doc
to inst/doc
?
I already tried devtools::build_vignettes()
. This is the output in the console:
> devtools::build_vignettes()
Building archivR vignettes
Moving vig1.html, vig2.html, vig1.R, vig2.R to doc/
Copying vig1.Rmd, vig2.Rmd to doc/
Building vignette index
It says that the files are copied to doc/
. They do not appear in inst/doc
.