Closed setgree closed 3 weeks ago
This is just plain awkward. But I've put all of my best advice here:
https://r-pkgs.org/vignettes.html#sec-vignettes-workflow-writing
Various solutions have been tried to the vignette-building workflow over the years and I honestly think many of them do more harm than good, which is explore more here:
It is tempting to fight this (and many have tried), but based on years of experience and discussion, the devtools philosophy is to accept this reality.
https://r-pkgs.org/vignettes.html#sec-vignettes-how-built
I still currently believe there is no obvious call-to-action to do something new in the (devtools) tooling.
Ok, maybe we can start with something smaller then.
Confused why
build(vignettes = T)
doesn't make vignettes available?
the help page for this function says
For source packages: if FALSE, don't build PDF vignettes (--no-build-vignettes) or manual (--no-manual).
Who is this message written for? why is only the behavior for FALSE defined? Can these things be improved with R's average user in mind, who is not a professional software engineer?
Confused why build(vignettes = T) doesn't make vignettes available?
Because build()
just builds a package but doesn't actually install it?
https://devtools.r-lib.org/reference/build.html
Building converts a package source directory into a single bundled file.
Thank you, I was able to figure out what I need and get the steps in order.
Distinguishing between what build
and install
are actually aiming to do was helpful.
Re: the different forms of an R package, this chapter might be helpful:
I am working on a package which is primarily vignette-based, available at https://github.com/setgree/PaluckMetaSOP.
My local branch and the above repo are synced.
I want to periodically see how my vignettes look overall, and it is a lot of steps to remember how to browse them.
so then I remember to do
devtools::install(build_vignettes = T)
, and once it's built, vignettes work.Then I make some changes to my packages, and I reinstall things. Let's say I forget the
build_vignettes
flag.Ok, so now I am thinking: what was that command again? Was it
build
withvignettes =T
? No I'm afraid that doesn't work(Confused why
vignettes = T
doesn't make vignettes available?)devtools::check()
does the trick. I guess that's what I should be running every time (though it takes about 90 seconds per run).But is there is a way to make this easier? The main thing would be, if I have vignettes available, I don't see why they become no longer available when I run
build
orinstall
.Thanks!