carloscinelli / sensemakr

Suite of sensitivity analysis tools for OLS
https://carloscinelli.com/sensemakr/
83 stars 15 forks source link

Vignette #15

Closed chadhazlett closed 6 years ago

chadhazlett commented 6 years ago

Thanks for drafting the vignette, MT! However I'm having trouble getting it to open using vignette(). I've checked and the yaml looks right, the directory name looks right, the Description appears to have updated. I've used devtools::build() to force it to build the vignette, and it does, but I still can't open it using vignette(). Any ideas?

statsccpr commented 6 years ago

Looks like what stumped both of us is really the default behavior of

devtools::install_github()

Looks like to get a vignette to show up is actually something during the install step (not the build). We need

devtools::install_github("chadhazlett/sensemakr",build_vignettes = TRUE,force=TRUE)

From

http://r-pkgs.had.co.nz/vignettes.html

Development cycle Run code a chunk at a time using Cmd + Alt + C. Re-run the entire document in a fresh R session using Knit (Ctrl/Cmd + Shift + K). You can build all vignettes from the console with devtools::build_vignettes(), but this is rarely useful. Instead use devtools::build() to create a package bundle with the vignettes included. RStudio’s “Build & reload” does not build vignettes to save time. Similarly, devtools::install_github() (and friends) will not build vignettes by default because they’re time consuming and may require additional packages. You can force building with devtools::install_github(build_vignettes = TRUE). This will also install all suggested packages.

With that, the sensemakr vignette shows up now

vignette(all=TRUE)

image

vignette('sensemakr',package = "sensemakr")

image

statsccpr commented 6 years ago

also just checked,

after 2 installation methods, vignette() works

statsccpr commented 6 years ago

related to how the final package should be built + installed

https://stackoverflow.com/questions/18588227/r-cmd-install-build-package-vignettes-missing#comment28391068_18624753

statsccpr commented 6 years ago

but note:

installing from file output by build > binary

does not include pdf nor html vignette it does show index to source rnw that created vignette