nimble-dev / nimbleEcology

18 stars 9 forks source link

patch vignette #15

Open cboettig opened 4 years ago

cboettig commented 4 years ago

@dochvam

Short answer is you need more devtools (and devtool-friends) in your life. Specifically, usethis::use_vignettes() will set all this up for you (and other usethis:: functions can set up everything else: travis, codecov and github actions, to adding package dependencies).

Long answer is that the .Rmd vignette mechanism was somewhat 'bolted on' long after good ol Sweave vignettes were well established, so it involves a bit of extra hackery.

For building, your method is fine, but try more devtools as well! To speed installation, devtools install methods actually skip vignette building by default (the opposite of R CMD build), but you can toggle this:

 devtools::install(build_vignettes=TRUE)

and witness:

 vignette("Introduction_to_nimbleEcology", package="nimbleEcology")

This same argument can be passed to devtools::install_github() (which is re-exporting remotes::install_github() ) to force the build of the vignettes.