I've been developing an R package for the past several months using RStudio. In the package I've been keeping the Vignette updated. I push it to a private GitHub repository so that my collaborator can then install it on his PC using:
to read the vignette for examples of new functionality.
That's worked well until the past month when he last checked out the package. Now the vignette() command throws a "vignette not found" warning.
When I build the package locally and look where RStudio installs the packages, I don't see a /doc directory. It now appears that the vignette is not being installed. Running knitr on the .RMD file works fine. I can even run
devtools::build_vignettes()
with no errors and the .html file is generated from the vignette. For some reason, building and installing the package no longer installs the vignette.
I haven't changed any build options during the package development. I've only update .R files and the vignette .RMD file. I haven't changed any markup at the top of the .RMD file.
I've searched the forums to see what I could have done to cause the vignette to stop being installed with the package but I haven't come across anything. Do anyone have any suggestions on how to resolve this?
Since devtools 2.0.0 update, there are some changes in behaviour.
The function devtools::install_github is now using remotes::install_github. This function has no build_vignettes = TRUE argument and by default vignette is not built.
However, there is a build_opts argument controlling the build process. By default, you'll see in help page that this argument contains by defaut --no-build-vignettes. You can remove this options to get the vignettes.
Thanks for the suggestion. That solved the problem!
Is there a way to have RStudio/devtools install the vignette locally (on the machine where the package is being developed)?