HenrikBengtsson / R.rsp

:page_facing_up: R package: Dynamic generation of scientific reports
https://henrikbengtsson.github.io/R.rsp/
31 stars 6 forks source link

vignette not showing up (static html) #43

Closed SNAnalyst closed 3 years ago

SNAnalyst commented 3 years ago

This is a question similar to this issue, but that didn't show any solution.

I followed the instructions from the R.rsp vignette and added to my vignettes folder of my SNA21 package: cheatsheet.html.asis cheatsheet.html

and added to DESCRIPTION:

Suggests:
    R.rsp
VignetteBuilder: R.rsp

The file "cheatsheet.html.asis" contains:

%\VignetteIndexEntry{SNA cheatsheet}
%\VignetteEngine{R.rsp::asis}
%\VignetteKeyword{HTML}
%\VignetteKeyword{vignette}
%\VignetteKeyword{package}

I have no inst/doc folder inside the package.

Then, I check and build the package using devtools::check(SNA21) and install with devtools::install_local(). The package works just fine, except that the vignette does not show up. When I try vignette(package = "SNA21") I get the message "no vignette found" and no vignette is indeed linked to in the documentation index of the package,

I use R 4.1.0, RStudio 1.4.1717, devtools 2.4.2, and R.rsp 0.44.0.

What could cause this behavior?

HenrikBengtsson commented 3 years ago

Have you tried building using vanilla R methods, i.e.

R CMD build SNA21

to get a SNA21_1.2.3.tar.gz? You know it works if it contains a inst/doc/cheatsheet.html file.

SNAnalyst commented 3 years ago

Thanks. Yes, that works fine. Does this mean this is really a devtools issue? Or the interaction between devtools and R.rsp?

HenrikBengtsson commented 3 years ago

Sounds like devtools to me.

SNAnalyst commented 3 years ago

OK, thanks.